Java @ Desk: Struts
Showing posts with label Struts. Show all posts
Showing posts with label Struts. Show all posts

Saturday, October 12, 2013

Integrate Struts Spring Hibernate web application

11:29 PM 0
Integrate Struts Spring Hibernate web application

The web application to be created using Struts Spring and Hibernate can be configured in 6 easy steps. This configuration is an example to configure hibernate using .hbm files using the HibernateDaoSupport as shown below:
1) Load the Spring application context xml file in struts-config - This can be achieved using the Spring pugin for struts org.springframework.web.struts.ContextLoaderPlugIn class. The jar in which you can find this class is org.springframework.web.struts-3.0.1.RELEASE.jar

<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">  
 <set-property property="contextConfigLocation"  
 value="/WEB-INF/springconfig/applicationContext.xml"/>  
 </plug-in>