Search code examples
javasitemesh

sitemesh page exclusion


I'd like to exclude a set of pages from decoration (using sitemesh 2 and spring-mvc 3.1). Here is my decorators.xml:

<decorators defaultdir="/WEB-INF/decorators">
    <excludes>
        <pattern>/WEB-INF/view/data/tabs</pattern>
    </excludes>
    <decorator name="main" page="main.jspx">
        <pattern>/WEB-INF/view/*</pattern>
        <pattern>/*</pattern>
    </decorator>
</decorators>

And then in my page I'm using jquery-ui tabs with ajax loaded pages, as described here: http://jqueryui.com/demos/tabs/#ajax. So obviously I don't want the content in the tabs decorated again! I've tried putting the pattern as /WEB-INF/view/data/tabs/* in addition to what's listed above, but that didn't work either.


Solution

  • web.xml is the main properties file that gets read by the container whne launching your webapp.
    It will take the interception point as a start point to your application, so every definition you make realted to your files start at this point as relative path.