Struts2 +Spring+ Hibernate整合实例

一、applicationContext.xml










    
        ${jdbc.driverClassName}
    
    
        ${jdbc.url}
    
    
        ${jdbc.username}
    
    
        ${jdbc.password}
    




    
    
    
    
    
    


    






    
        
    




    





二、ehcache.xml






 
 

三、hibernate.cfg.xml





    
        
            org.hibernate.dialect.OracleDialect
        
        false
        none
        false
        
        true
        
        
        true
        
        
        
            org.hibernate.cache.EhCacheProvider
        
        true
        
            /ehcache.xml
        
        
        
    

四、struts.xml

















  



    
        /index.jsp
    


五、web.xml



Temp

index.jsp



    SetCharacterEncoding
    org.springframework.web.filter.CharacterEncodingFilter

    encoding
    GBK


    forceEncoding
    true


    
    SetCharacterEncoding
    /*




    contextConfigLocation
    classpath:applicationContext.xml


    org.springframework.web.context.ContextLoaderListener


    
        org.springframework.web.context.request.RequestContextListener
    





    hibernateFilter
    org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
    
        sessionFactoryBeanName
        sessionFactory
    


    hibernateFilter
    /*




    struts2
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter


    struts2
    *.action
    REQUEST
    FORWARD



你可能感兴趣的:(Struts2 +Spring+ Hibernate整合实例)