You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "CRANFORD, CHRIS" <Ch...@setech.com> on 2009/06/29 22:49:42 UTC
Struts2/Hibernate/Sitemesh
I am looking to use the following tools for our web application:
- Struts 2.1.6
- Hibernate 3
- Sitemesh
In our WEB.XML file I have added the following lines to support Struts2
with Sitemesh.
<filter>
<filter-name>struts2-cleanup</filter-name>
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter
-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter
-class>
</filter>
<filter>
<filter-name>struts2-prepare</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilte
r</filter-class>
</filter>
<filter>
<filter-name>struts2-execute</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilte
r</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2-cleanup</filter-name>
</url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh<filter-name>
</url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2-prepare</filter-name>
</url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2-execute</filter-name>
</url-pattern>/*</url-pattern>
</filter-mapping>
In my Struts1 application, we simply added another filter to the web.xml
file that was called HibernateSessionInitFilter which extended the
standard javax.servlet.Filter class. But what I see is suppose to
happen in Struts2 is that I am suppose to subclass the struts2 class to
add the hibernate framework.
Should the StrutsPrepareFilter be subclassed or the StrutsExecuteFilter?
Thanks
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org