分享

Spring + Struts2 注解驱动配置文件【web.xml】

 CevenCheng 2010-09-25
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
xmlns="http://java./xml/ns/javaee" 
xmlns:xsi="http://www./2001/XMLSchema-instance" 
xsi:schemaLocation="http://java./xml/ns/javaee 
http://java./xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:beans.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
   <!-- Filters -->
   <filter>
   <filter-name>setcharaterFilter</filter-name>
   <filter-class>test.haohui.resl.filter.SetCharaterFilter</filter-class>
   <init-param>
   <param-name>encoding</param-name>
   <param-value>UTF-8</param-value>
   </init-param>
   </filter>
  
   <filter-mapping>
   <filter-name>setcharaterFilter</filter-name>
   <url-pattern>/*</url-pattern>
   </filter-mapping>
   <!-- START SNIPPET: filter -->
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
    <!-- END SNIPPET: 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>
</web-app>

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多