
|
If you were logged in you would be able to see more operations.
|
|
|
SiteMesh
Created: 10/Aug/04 04:45 AM
Updated: 19/Aug/04 04:59 PM
|
|
| Fix Version/s: |
2.2
|
|
|
Environment:
|
Windows XP. weblogic 8.1 sp2. jdk 1.4.2_03. sitemesh 2.1
|
|
|
The excludes on my configuration seems not be working.
When i try to access any css in directory /css ( that is in the excludes ) i get the following error:
java.lang.NullPointerException
at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getPage(PageResponseWrapper.java:263)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:147)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6356)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
My configuration of sitemesh is as follows:
Web.xml:
.....
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
......
sitemesh.xml:
<sitemesh>
<property name="decorators-file" value="/WEB-INF/decorators.xml" />
<excludes file="${decorators-file}" />
<page-parsers>
<parser content-type="text/html"
class="com.opensymphony.module.sitemesh.parser.FastPageParser" />
<parser content-type="text/html;charset=ISO-8859-1"
class="com.opensymphony.module.sitemesh.parser.FastPageParser" />
</page-parsers>
<decorator-mappers>
<mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
<param name="config" value="${decorators-file}" />
</mapper>
</decorator-mappers>
</sitemesh>
decorators.xml:
<decorators defaultdir="/decorators">
<excludes>
<pattern>/js/*</pattern>
<pattern>/css/*</pattern>
<pattern>/img/*</pattern>
</excludes>
<decorator name="main" page="main.jsp">
<pattern>*</pattern>
</decorator>
</decorators>
|
|
Description
|
The excludes on my configuration seems not be working.
When i try to access any css in directory /css ( that is in the excludes ) i get the following error:
java.lang.NullPointerException
at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getPage(PageResponseWrapper.java:263)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:147)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6356)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
My configuration of sitemesh is as follows:
Web.xml:
.....
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
......
sitemesh.xml:
<sitemesh>
<property name="decorators-file" value="/WEB-INF/decorators.xml" />
<excludes file="${decorators-file}" />
<page-parsers>
<parser content-type="text/html"
class="com.opensymphony.module.sitemesh.parser.FastPageParser" />
<parser content-type="text/html;charset=ISO-8859-1"
class="com.opensymphony.module.sitemesh.parser.FastPageParser" />
</page-parsers>
<decorator-mappers>
<mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
<param name="config" value="${decorators-file}" />
</mapper>
</decorator-mappers>
</sitemesh>
decorators.xml:
<decorators defaultdir="/decorators">
<excludes>
<pattern>/js/*</pattern>
<pattern>/css/*</pattern>
<pattern>/img/*</pattern>
</excludes>
<decorator name="main" page="main.jsp">
<pattern>*</pattern>
</decorator>
</decorators>
|
Show » |
| There are no comments yet on this issue.
|
|