Page 1 of 1

integrate struts2 ,spring and hibernate. Configuration

PostPosted: Fri Mar 18, 2011 9:07 pm
by haretu
the summary of integration steps :

    Get all the dependency libraries (a lot).
    Register Spring’s ContextLoaderListener to integrate Struts 2 and Spring.
    Use Spring’s LocalSessionFactoryBean to integrate Spring and Hibernate.
    Done, all connected.

Insert in web.xml
Code: Select all

in struts.xml insert
Code: Select all
     <constant name="struts.objectFactory" value="spring" />

in applicationContext.xml insert
Code: Select all
<bean id="SessionFactory"
      <property name="dataSource">
         <ref bean="dataSource" />
      <property name="mappingResources">