频道栏目
首页 > 资讯 > HTML/CSS > 正文

struts2 2.5以上版本安装中web.xml的配置教程

17-11-30        来源:[db:作者]  
收藏   我要投稿

struts2 2.5以上版本安装中web.xml的配置教程(包括核心过滤器filter)

<?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" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  <display-name>zhongbao</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>struts2</filter-name> <!-- 过滤器的名字 -->  
        <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> <!-- 引用个具体类文件 -->  
    </filter>  
    <filter-mapping>  
        <filter-name>struts2</filter-name>  
        <url-pattern>/*</url-pattern>  
    </filter-mapping>  

</web-app>

 

相关TAG标签
上一篇:php查询到的数据乱码和转json时中文变成了Unicode的编码怎么解决?
下一篇:View三大流程measure、layout、draw的工作原理讲解
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站