I am trying to add sitemesh with Struts 2 , but there is this issue of filter priority coming. When I add Struts first and then Sitemesh as :
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Struts tags works like but decorator doesn't work with Jetty
(Works fine in tomcat)
If I reverse and put sitemesh first, then decorator work but there comes error with struts2 tags. (Both Jetty and Tomcat)
Thanks.
Please try it's suggested configuration as below which is mentioned at Struts SiteMesh Plugin homepage