读书人

spring 管理struts2.0和hibernate3.0

发布时间: 2012-03-19 22:03:04 作者: rapoo

spring 管理struts2.0和hibernate3.0 需要哪些配置文件?
spring 管理struts2.0和hibernate3.0 需要哪些配置文件?
applicationContext.xml配置文件里面的配置属性每行都是什么意思?
web.xml文件怎么配置spring ?
请高手帮助解释下!谢谢.....

[解决办法]
web.xml

Java code
<filter>        <filter-name>openSession</filter-name>        <filter-class>            org.springframework.orm.hibernate3.support.OpenSessionInViewFilter        </filter-class>        <init-param>            <param-name>flushMode</param-name>            <param-value>AUTO</param-value>        </init-param>    </filter>    <filter-mapping>        <filter-name>openSession</filter-name>        <url-pattern>/*</url-pattern>    </filter-mapping>    <filter>        <filter-name>struts2</filter-name>        <filter-class>            org.apache.struts2.dispatcher.FilterDispatcher        </filter-class>    </filter>    <filter-mapping>        <filter-name>struts2</filter-name>        <url-pattern>/*</url-pattern>    </filter-mapping>    <listener>        <listener-class>            org.springframework.web.context.ContextLoaderListener        </listener-class>    </listener>    <context-param>        <param-name>contextConfigLocation</param-name>        <param-value>/WEB-INF/applicationContext.xml</param-value>    </context-param> 

读书人网 >J2EE开发

热点推荐