integrate struts2 ,spring and hibernate. Configuration

Commonly used J2EE server side frameworks.

integrate struts2 ,spring and hibernate. Configuration

Postby haretu » Fri Mar 18, 2011 9:07 pm

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">
Posts: 132
Joined: Sat Jan 08, 2011 9:56 pm

Return to struts,spring,hibernate

Who is online

Users browsing this forum: No registered users and 1 guest