Exception starting filter struts2 - tried adding JAR's, but same result

时间秒杀一切 提交于 2019-11-26 14:47:24

Since you are using Struts 2.3,

FilterDispatcher is deprecated. You MUST use StrutsPrepareAndExecuteFilter (or its little brothers).

From the official documentation

Deprecated. Since Struts 2.1.3, use StrutsPrepareAndExecuteFilter instead or StrutsPrepareFilter and StrutsExecuteFilter if needing using the ActionContextCleanUp filter in addition to this one

change then this

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

to this:

<!-- Struts >= 2.1.3 and < 2.5 -->
<filter-class>
     org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>

Note that, from 2.5, it would be instead:

<!-- Struts >= 2.5 -->
<filter-class>
     org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
</filter-class>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!