Problem excluding pages with siteMesh Struts2 Tomcat 6

I'm using Struts2.2.1.1 with sitemesh 2.4.1 in Apache-Tomcat 6.0.29. It works fine, but i can't exclude a file from siteMesh.

I Have My decorators in WebContent/jsp/decorators but i want to exclude the file WebContent/jsp/forms/Authentication.jsp. I tried using this decorators.xml with default dir = "/jsp/decorators":

<excludes> <pattern>../forms/Authentication.jsp</pattern> </excludes> <decorator name="main" page="layout.jsp"> <pattern>/*</pattern> </decorator>

I also tried to change pattern tag to use /jsp/forms/Authentication.jsp and didn't work either. Could anyone give me some pointers in the right direction? thanks a lot.

Juan David


In addition to what you have, you need to configure the excludes in your sitemesh.xml file, like this:-


<decorator name="main" page="layout.jsp">


<property name="decorators-file" value="/WEB-INF/decorators.xml" />
<excludes file="${decorators-file}" />

<parser content-type="text/html" class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />
<parser content-type="text/html;charset=ISO-8859-1" class="com.opensymphony.module.sitemesh.parser.HTMLPageParser" />

<mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
<param name="config" value="${decorators-file}" />

Category:java Time:2011-02-03 Views:0

Related post

Copyright (C), All Rights Reserved.

processed in 0.898 (s). 13 q(s)