Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sitemesh3 decorator content is not logged by logbook. #1083

Closed
msk-git-hub opened this issue Jun 30, 2021 · 2 comments
Closed

sitemesh3 decorator content is not logged by logbook. #1083

msk-git-hub opened this issue Jun 30, 2021 · 2 comments

Comments

@msk-git-hub
Copy link

msk-git-hub commented Jun 30, 2021

I've added the logbook filter programmatically

servletContext.addFilter("LogbookFilter", new LogbookFilter())
				.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST, DispatcherType.ASYNC), true, "/*");

The logging works fine and I am able to see the contents of the web page response (<html> ... </html>).
However, the sitemesh3 decorator content that is visible in the response webpage is not getting logged by logbook.

web.xml

	<filter>
	    <filter-name>sitemesh</filter-name>
	    <filter-class>org.sitemesh.config.ConfigurableSiteMeshFilter</filter-class>
	</filter>
	
	<filter-mapping>
	    <filter-name>sitemesh</filter-name>
	    <url-pattern>/*</url-pattern>
	</filter-mapping>

sitemesh3.xml

<?xml version="1.0" encoding="UTF-8"?>
<sitemesh>
    <mapping path="/*" decorator="/WEB-INF/jsp/defaultdecorator.jsp"/>
</sitemesh>

defaultdecorator.jsp

<html>
 <head>
 <title><sitemesh:write property="title"/></title>
 <sitemesh:write property="head"/>
 </head>
 
 <body>
 	<div style="color: red"><p>
 		<br/><br/><br/><br/><br/><br/> This message is inside the decorator
 	</p></div>
 	<sitemesh:write property="body"/>
 </body>
</html>

I can see the message This message inside the decorator in the response page, but the logbook logs doesn't have this text.

@whiskeysierra
Copy link
Collaborator

Maybe the filters are running out of order? Logbook should be the outer-most filter.

@no-response
Copy link

no-response bot commented Sep 10, 2021

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants