<?xml version="1.0" encoding="UTF-8"?>
|
<web-app version="3.0" 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_3_0.xsd">
|
<display-name>mandi</display-name>
|
<context-param>
|
<param-name>contextConfigLocation</param-name>
|
<param-value>classpath:applicationcontext.xml</param-value>
|
</context-param>
|
<filter>
|
<filter-name>encodingfilter</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>
|
<filter-mapping>
|
<filter-name>encodingfilter</filter-name>
|
<url-pattern>/*</url-pattern>
|
</filter-mapping>
|
<listener>
|
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
|
</listener>
|
<listener>
|
<!--启动webapplicationcontext-->
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
</listener>
|
<!--
|
<servlet>
|
<servlet-name>Faces Servlet</servlet-name>
|
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
|
<load-on-startup>1</load-on-startup>
|
</servlet>
|
|
<servlet-mapping>
|
<servlet-name>Faces Servlet</servlet-name>
|
<url-pattern>*.jsf</url-pattern>
|
</servlet-mapping>
|
-->
|
<servlet>
|
<servlet-name>spring</servlet-name>
|
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
</servlet>
|
<servlet-mapping>
|
<servlet-name>spring</servlet-name>
|
<url-pattern>*.htm</url-pattern>
|
</servlet-mapping>
|
|
|
<!-- CXF的Servlet -->
|
<servlet>
|
<servlet-name>cxf</servlet-name>
|
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
|
<load-on-startup>1</load-on-startup>
|
</servlet>
|
<servlet-mapping>
|
<servlet-name>cxf</servlet-name>
|
<url-pattern>/ws/*</url-pattern>
|
</servlet-mapping>
|
|
|
<servlet>
|
<servlet-name>Kaptcha</servlet-name>
|
<servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>
|
<init-param>
|
<param-name>kaptcha.border</param-name>
|
<param-value>no</param-value>
|
</init-param>
|
<init-param>
|
<param-name>kaptcha.image.width</param-name>
|
<param-value>200</param-value>
|
</init-param>
|
<init-param>
|
<param-name>kaptcha.image.height</param-name>
|
<param-value>50</param-value>
|
</init-param>
|
<!-- <init-param>
|
<param-name>kaptcha.textproducer.impl</param-name>
|
<param-value>com.mandi.system.utils.KaptchaTextutil</param-value>
|
</init-param> -->
|
<init-param>
|
<param-name>kaptcha.textproducer.font.size</param-name>
|
<param-value>40</param-value>
|
</init-param>
|
<init-param>
|
<param-name>kaptcha.textproducer.char.space</param-name>
|
<param-value>5</param-value>
|
</init-param>
|
<init-param>
|
<param-name>kaptcha.textproducer.char.length</param-name>
|
<param-value>4</param-value>
|
</init-param>
|
<init-param>
|
<param-name>kaptcha.textproducer.font.color</param-name>
|
<param-value>blue</param-value>
|
<!-- <param-value>1,174,239</param-value> -->
|
</init-param>
|
</servlet>
|
<servlet-mapping>
|
<servlet-name>Kaptcha</servlet-name>
|
<url-pattern>/kaptcha/kaptcha/kaptcha.ktc</url-pattern>
|
</servlet-mapping>
|
|
<session-config>
|
<session-timeout>60</session-timeout>
|
</session-config>
|
<welcome-file-list>
|
<welcome-file>login.jsf</welcome-file>
|
</welcome-file-list>
|
</web-app>
|