FilterDispatcher is deprecated! - What is the replacement for FilterDispatcher?

J888 picture J888 · Apr 26, 2013 · Viewed 19.5k times · Source

How to avoid the following error? I am implementing Spring-Security on Struts2, the application runs perfectly but the following message will be shown on server log.

 WARNING!!!                            
 FilterDispatcher <<< is deprecated! Please use the new filters!                                                                      
      This can be a source of unpredictable problems!                                                                  
         Please refer to the docs for more details!                           
         http://struts.apache.org/2.x/docs/webxml.html            

Answer

Dave Newton picture Dave Newton · Apr 26, 2013

I'd recommend following the link and doing what it says:

<filter>
    <filter-name>struts2</filter-name>

    <filter-class>
        org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
    </filter-class>
</filter>