hibernate与struts、spring三大框架整合中web-xml的使用介绍
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml</param-value>
</context-param>
<!-- 启动SPring-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
<!-- 处理中文乱码-->
<filter>
<filter-name>Spring character encoding filter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Spring character encoding filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- spring封装hibernate后,提供启动、关闭session, 来处理hibernate抛出的异常--> <filter>
<filter-name>hibernateFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> </filter>
<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>pagerFilter</filter-name>
<filter-class>com.bjsxt.oa.web.PagerFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>pagerFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>dwr-invoker</servlet-name>