This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Why different default FilterDispatcher? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Why different default FilterDispatcher?" Watch "Why different default FilterDispatcher?" New topic
Author

Why different default FilterDispatcher?

raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
Hi
I am learning strtus2 from struts2 in action book.I see default filter class as

org.apache.struts2.dispatcher.FilterDispatcher

But when i use Myeclipse to generate struts2 project, i see different class declared in the web.xml i.e.
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

Why is different declarations?Are they specific to struts2 version.In case yes what is there functional difference?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9307
    
  17

Checkout the documentation of FilterDispatcher class, it says
Deprecated. Since Struts 2.1.3, use StrutsPrepareAndExecuteFilter instead or StrutsPrepareFilter and StrutsExecuteFilter if needing using the ActionContextCleanUp filter in addition to this one

David must know the exact reason why it has been deprecated (I didn't knew that it was deprecated so don't know the reason as well )...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why different default FilterDispatcher?