aspose file tools*
The moose likes Struts and the fly likes Confused with Built in Inerceptors in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Confused with Built in Inerceptors in Struts2" Watch "Confused with Built in Inerceptors in Struts2" New topic
Author

Confused with Built in Inerceptors in Struts2

PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212



Are these default interceptors are automatically included for every Action (I am not including the interceptor in my action tag in struts.xml) . Do i need to include them explicitly or they fire implicitly ??

Please help on this .
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9321
    
  17

Pavan, you can configure the default interceptor stack to be used for your actions in a package using this syntax



Usually when we define a package in struts.xml, then we extend the struts-default package. That package contains a defaultStack which you can see here. So if you don't specify a default interceptor stack for your package, then the defaultStack will be used. Please note that this only happens if you don't explicitly provide an interceptor stack for you action. So if a package contains an action which has no interceptor stack of its own, then the defaultStack will be used. But if an action has an interceptor stack of its own, then the defaultStack will not be applied on that action...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
Thanks i got the point.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confused with Built in Inerceptors in Struts2