I am trying to learn Struts2. When I see the web.xml file for Struts2 in some of the sites it’s mentioned as:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
and where as in some examples its mentioned as:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
Could anybody please help me? What is correct and why is it there are two approaches?
Thank you very much.
The FilterDispatcher (org.apache.struts2.dispatcher.FilterDispatcher) it’s deprecated since
Struts 2.1.3. It’s always recommend to use StrutsPrepareAndExecuteFilter