Difference between two Struts filters?

I saw two kinds of Struts 2 filters in web.xml.

  • org.apache.struts2.dispatcher.FilterDispatcher
  • org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

Please give me the difference between these two filters?

+5
source share
1 answer

Well, the new filter was introduced for the following reasons.

  • There have been many issues with FilterDispatcherand its deployment.
  • The new filter provides the best way to enable settings and overrides.
  • Check which filters do what the processes do.
  • make the sending process more flexible to support things like the built-in operation in OSGi or the plug-in system.

Because of them, the main reasons were: earlier, the filter manager had a lot of problems, and for another reason, he had to switch to OSGI.

+4
source

All Articles