5eba9bcfc10f12cce877bd53eb24f4bac1269f89.svn-base 1.6 KB
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
	xmlns="http://java.sun.com/xml/ns/javaee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  	
  	<filter>
	   <filter-name>openSessionInView</filter-name>
	   <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
	</filter>

	<filter-mapping>
	    <filter-name>openSessionInView</filter-name>
	    <url-pattern>/*</url-pattern>       
	</filter-mapping>

  
	
	
	<!-- 配置spring监听器 -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath:applicationContext.xml</param-value>
	</context-param>
	<listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>
	
	<!-- Spring乱码处理 -->
	<filter>
		<filter-name>characterEncoding</filter-name>
		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
		<init-param>
			<param-name>forceEncoding</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>
	
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  
    	<!-- 开机运行方法 -->
	<servlet>
  		<servlet-name>initServlet</servlet-name>
  		<servlet-class>com.espeed.yxy.tool.ServiceInit</servlet-class>
  		<load-on-startup>1</load-on-startup>
 	</servlet>
</web-app>