首页 > Web开发 > 详细

【struts2.5配置】web.xml配置

时间:2017-09-25 21:32:59      阅读:220      评论:0      收藏:0      [点我收藏+]
一、引用jar包

1. 将下载好的struts下的核心类库复制到/WEB-INF/lib目录下

技术分享


二、web.xml配置

check your struts2-core-x.x.jar version.

-->if it is struts2-core-2.5.jar then change your filter class tag value in web.xml to

<filter-class>
     org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
  </filter-class>

-->if it is struts2-core-2.1.3.jar then change your filter class tag value in web.xml to

<filter-class>
     org.apache.struts2.dispatcher.FilterDispatcher
  </filter-class>

FilterDispatcher is deprecated since Struts 2.1.3. If you are working with older versions then user above solution.

-->if it is struts2-core-2.3.X.jar then change your filter class tag value in web.xml to

<filter-class> 
    org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>

【struts2.5配置】web.xml配置

原文:http://www.cnblogs.com/guoxh/p/7593882.html

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