Exception starting filter struts2 – tried adding JAR’s, but same result

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>

Leave a Comment