web.xml

  1. 云栖社区>
  2. 博客列表>
  3. 正文

web.xml

珠海_jadeluo 2016-05-17 13:33:50 浏览419 评论0

摘要: <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.

<?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"> 

  <display-name>Struts 2.1.6</display-name> 
  <!-- zh-cn encoding -->   
<filter> 
  <filter-name>encodeFilter</filter-name> 
  <filter-class>com.huike.hidp.util.EncodeFilter </filter-class> 
  <init-param> 
  <param-name>encode </param-name> 
  <param-value>utf-8 </param-value> 
  </init-param> 
  </filter> 
  <!-- 字符编码映射 --> 
  <filter-mapping> 
  <filter-name>encodeFilter</filter-name> 
  <url-pattern>/* </url-pattern> 
  </filter-mapping> 


<!-- session超时定义,单位为分钟 --> <!-- 配置session时间  设置监听用来记录登陆人员的数量  Start --> 
   
<session-config> 
<session-timeout>10</session-timeout> 
</session-config> 

<listener>    
        <listener-class>    
            com.huike.hidp.util.listener.OnlineCounterListener    
        </listener-class>    
    </listener>   
   <!-- End --> 
  
    <!-- 配置sturts2的 --> 
    <!-- 由于fckeditor上传文件重写了Struts2的FilterDispatcher --> 
  <filter> 
     <filter-name>struts2</filter-name> 
     <filter-class>com.huike.hidp.util.filter.MyStrutsFilterDispatcher</filter-class> 
     <init-param>    
       <param-name>config </param-name>    
       <param-value>struts-default.xml,struts-plugin.xml,../xml/hidp/struts-admin.xml,../xml/hidp/struts-message.xml,../xml/hidp/struts-privilege.xml,../xml/hidp/struts-organization.xml,../xml/hidp/struts-mail.xml,../xml/hidp/struts-address.xml,../xml/hidp/struts-process.xml,../xml/hidp/struts-customform.xml,../xml/hidp/struts-customformdata.xml,../xml/hidp/struts-processrole.xml</param-value>    
     </init-param>  
  </filter> 
    
  <filter-mapping> 
   <filter-name>struts2</filter-name> 
    <url-pattern>/*</url-pattern>    
  </filter-mapping> 
<!-- 配置系统启动页 --> 
  <welcome-file-list> 
     <welcome-file>/index.jsp</welcome-file> 
  </welcome-file-list> 

<!--Start配置过滤文件用以限制手动输入jsp路径  --> 
   <filter> 
        <filter-name>dispatcherFilter</filter-name> 
          <filter-class> 
             com.huike.hidp.util.listener.DispatcherFilter 
          </filter-class> 
   </filter> 
   
  <filter-mapping> 
        <filter-name>dispatcherFilter</filter-name> 
        <url-pattern>/*</url-pattern> 
  </filter-mapping> 
  
<!--End  --> 

    <!-- 配置监听 由spring来管理 --> 
   <context-param> 
     <param-name>contextConfigLocation</param-name> 
       <param-value>/WEB-INF/xml/hidp/applicationContext*.xml</param-value> 
   </context-param> 
   
  <listener> 
   <listener-class> 
      org.springframework.web.context.ContextLoaderListener 
   </listener-class> 
  </listener> 

   <!-- fckeditor上传文件 --> 
<servlet> 
<servlet-name>Connector</servlet-name> 
<servlet-class>com.huike.hidp.util.servlet.ConnectorServlet</servlet-class> 
<load-on-startup>1</load-on-startup> 
</servlet> 
  

<servlet-mapping> 
<servlet-name>Connector</servlet-name> 
<url-pattern>/fckeditor/editor/filemanager/connectors/*</url-pattern> 
</servlet-mapping> 

<!--End  --> 
</web-app>
【云栖快讯】阿里云栖开发者沙龙(Java技术专场)火热来袭!快来报名参与吧!  详情请点击

网友评论