码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2017-09-25 21:54:25      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:user   struts2   strong   es2017   1.3   exec   version   web.xml   struts 2   

一、引用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配置

标签:user   struts2   strong   es2017   1.3   exec   version   web.xml   struts 2   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!