diff options
Diffstat (limited to 'webservice/src/main/webapp/WEB-INF/web.xml')
-rw-r--r-- | webservice/src/main/webapp/WEB-INF/web.xml | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/webservice/src/main/webapp/WEB-INF/web.xml b/webservice/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..6f7545d --- /dev/null +++ b/webservice/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" + id="WebApp_ID" version="3.0"> + + <display-name>springmvcRestful</display-name> + + <filter> + <description>字符集过滤器</description> + <filter-name>encodingFilter</filter-name> + <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> + <init-param> + <description>字符集编码</description> + <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> + <filter-mapping> + <filter-name>encodingFilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter> + <filter-name>filter</filter-name> + <filter-class>app.market.webservice.Filter</filter-class> + </filter> + <filter-mapping> + <filter-name>filter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <listener> + <description>spring监听器</description> + <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> + </listener> + + <listener> + <description>防止spring内存溢出监听器</description> + <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class> + </listener> + + <!-- spring mvc servlet --> + <servlet> + <description>spring mvc servlet</description> + <servlet-name>springmvcRestful</servlet-name> + <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> + <init-param> + <description>spring mvc 配置文件</description> + <param-name>contextConfigLocation</param-name> + <param-value>classpath:servlet-context.xml</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + <servlet-mapping> + <servlet-name>springmvcRestful</servlet-name> + <url-pattern>/</url-pattern> + </servlet-mapping> + + <context-param> + <param-name>contextConfigLocation</param-name> + <param-value>classpath:spring-mybatis.xml</param-value> + </context-param> + + <filter> + <filter-name>HiddenHttpMethodFilter</filter-name> + <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class> + </filter> + <filter-mapping> + <filter-name>HiddenHttpMethodFilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <listener> + <listener-class>app.market.webservice.Log4jlistener</listener-class> + </listener> + <context-param> + <param-name>log4jConfigLocation</param-name> + <param-value>classpath:log4j.xml</param-value> + </context-param> + + <listener> + <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> + </listener> + + <context-param> + <param-name>webAppRootKey</param-name> + <param-value>appmarketservice.root</param-value> + </context-param> +</web-app>
\ No newline at end of file |