首页 > Web开发 > 详细

SSH web.xml文件配置

时间:2015-10-13 19:01:28      阅读:220      评论:0      收藏:0      [点我收藏+]
<?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_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>Agree</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  
          <filter>
            <filter-name>platform</filter-name>
            <filter-class>com.agree.platform.core.dispatcher.InitializeFilter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>platform</filter-name>
            <url-pattern>*.do</url-pattern>
        </filter-mapping>
         
         <!-- 参数过滤器 -->
         <filter>
            <filter-name>SpecialCharacterFilter</filter-name>
            <filter-class>com.agree.framework.struts2.filter.SpecialCharacterFilter</filter-class>
            <init-param>   <!--初始化参数-->  
                 <param-name>encoding</param-name>  <!--参数名称-->  
                 <param-value>UTF-8</param-value>   <!--参数值-->  
             </init-param>
        </filter>
        <filter-mapping>
            <filter-name>SpecialCharacterFilter</filter-name>
            <url-pattern>*.do</url-pattern>
        </filter-mapping>
        
        
        <filter>
            <filter-name>struts2</filter-name>
            <filter-class>com.agree.framework.struts2.filter.DefaultFilter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>struts2</filter-name>
            <url-pattern>*.do</url-pattern>
        </filter-mapping>
        
        
        
        <context-param>
            <description>spring的配置文件</description>
            <param-name>contextConfigLocation</param-name>
            <param-value>
                /WEB-INF/classes/applicationContext.xml,
                /WEB-INF/classes/resources/framework/spring/*.xml
            </param-value>
        </context-param>
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        <listener>
            <description>spring的日志加载器</description>
            <listener-class>
                org.springframework.web.util.Log4jConfigListener
            </listener-class>
        </listener>
        
        <context-param>
            <description/>
            <param-name>log4jConfigLocation</param-name>
            <param-value>/WEB-INF/classes/log4j.properties</param-value>
        </context-param>
        <context-param>
              <param-name>webAppRootKey</param-name>
              <param-value>webApp.aim.root</param-value><!-- 系统根标志,各个系统不同 -->
         </context-param>
    
        <error-page>
            <error-code>404</error-code>
            <location>/errorShow_404.jsp</location>
        </error-page>
        <error-page>
            <error-code>500</error-code>
            <location>/errorDispatcher_500.jsp</location>
        </error-page>
</web-app>

 

SSH web.xml文件配置

原文:http://www.cnblogs.com/huadoumi/p/4875196.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!