siteMeshInterceptor except a page
i use siteMeshInterceptor for my spring mvc project. Is there a way开发者_开发技巧 excluding a page from interception? I want to solve this in dispatcherServlet, not in interceptor code.
inceptor looks like this in dispatcherServlet;
<property name="interceptors">
<list>
<ref local="myInterceptor"/>
</list>
</property>
Thanks.
You can define different sitemash decorators for different url patterns.
decorators.xml
<decorators defaultdir="/WEB-INF/sitemesh/decorators">
<excludes>
<pattern>/login.html*</pattern>
</excludes>
<decorator name="main" page="main.jsp">
<pattern>/*</pattern>
</decorator>
<decorator name="main" page="main.jsp">
<pattern>/help/*</pattern>
</decorator>
</decorators>
精彩评论