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

Page Parsers and Mappers #70

Closed
mdeimel opened this issue Oct 29, 2014 · 3 comments
Closed

Page Parsers and Mappers #70

mdeimel opened this issue Oct 29, 2014 · 3 comments

Comments

@mdeimel
Copy link

mdeimel commented Oct 29, 2014

Not sure if this is just a question or an issue, but I'm trying to prevent ajax content from being decorated. I was hoping to only decorate when the Accept header is in a specific list of values (such as "text/html"). It looks like Page Parsers and Mappers would work for SiteMesh2, but I don't find those in SiteMesh3, and the roadmap seems to show those as in-the-works.

Can anyone tell me if there is an alternative, or a way to get the equivalent of Page Parser and Mappers?

Thanks for your help.

@tommyxu
Copy link

tommyxu commented Oct 29, 2014

It is based on the Content-Type of response instead of the "Accept" request header. I think it is reasonable. So I think it's not a problem.
Related code is in HttpServletResponseBuffer.java

@tommyxu
Copy link

tommyxu commented Oct 29, 2014

If you use SiteMeshFilterBuilder, try setMimeTypes(String... mimeTypes)

@mdeimel
Copy link
Author

mdeimel commented Oct 30, 2014

I was able to fix this by using an exclude path. The format is different between SiteMesh2 and SiteMesh3, here is what I used.

<sitemesh>
    <mapping path="/*" decorator="/WEB-INF/decorators/default.jsp"/>

    <!-- Paths to be excluded from decorating -->
    <mapping path="*/path/to/exclude*" exclue="true"/>
</sitemesh>

Thanks for the help @tommyxu

@mdeimel mdeimel closed this as completed Oct 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants