首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

Web.xml SSH+异常页面+超时时间、配置

2012-10-09 
Web.xmlSSH+错误页面+超时时间、、配置?xml version1.0 encodingUTF-8?web-app version2.5 xmln

Web.xml SSH+错误页面+超时时间、、配置

<?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"><welcome-file-list><welcome-file>index.html</welcome-file><welcome-file>index.jsp</welcome-file></welcome-file-list><!--Spring ApplicationContext配置文件的路径,可使用通配符,多个路径用,号分隔 此参数用于后面的SpringContext Loader--><context-param><param-name>contextConfigLocation</param-name><param-value>classpath:applicationContext.xml</param-value></context-param><!-- Filter 定义  --><!-- Character Encoding filter --><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><!-- Struts2 filter --><filter><filter-name>struts2CleanupFilter</filter-name><filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class></filter><filter><filter-name>struts2Filter</filter-name><filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class></filter><!-- display tag 配置的过滤器 --><filter><filter-name>exportFilter</filter-name><filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class></filter><!-- Filter 映射 --><filter-mapping><filter-name>encodingFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping><filter-mapping><filter-name>struts2CleanupFilter</filter-name><url-pattern>*.action</url-pattern><dispatcher>REQUEST</dispatcher><dispatcher>FORWARD</dispatcher></filter-mapping><filter-mapping><filter-name>struts2Filter</filter-name><url-pattern>*.action</url-pattern><dispatcher>REQUEST</dispatcher><dispatcher>FORWARD</dispatcher></filter-mapping><!--Spring的ApplicationContext 载入 --><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener><!-- Spring 刷新Introspector防止内存泄露 --><listener><listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class></listener><!--监听器配置,java监听器,登陆监听session,Listener <listener><listener-class>com.idcorner.action.listener.LoginListener</listener-class></listener>--><!-- session超时定义,单位为分钟 --><session-config><session-timeout>30</session-timeout></session-config><!--配置错误显示页面 <error-page> <error-code>404</error-code><location>/404.jsp</location> </error-page> <error-page><error-code>500</error-code> <location>/404.jsp</location></error-page>--><!-- 配置添加标签说明  --><jsp-config><taglib><taglib-uri>http://java.sun.com/jstl/core</taglib-uri><taglib-location>/WEB-INF/c.tld</taglib-location></taglib><!--<taglib> <taglib-uri>http://displaytag.sourceforge.net/</taglib-uri><taglib-location>/WEB-INF/displaytag-11.tld</taglib-location></taglib>--><taglib><taglib-uri>http://displaytag.sf.net</taglib-uri><taglib-location>/WEB-INF/displaytag.tld</taglib-location></taglib></jsp-config><mime-mapping><extension>css</extension><mime-type>text/css</mime-type></mime-mapping></web-app>

热点排行