GeeCON Prague 2014*
The moose likes Struts and the fly likes Interceptors vs. BaseActions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Interceptors vs. BaseActions" Watch "Interceptors vs. BaseActions" New topic
Author

Interceptors vs. BaseActions

Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4474
    
    6

Been looking at the Struts Action Invocation Framework and was wondering if the Interceptors would make it unnecessary to have all your Actions extend a BaseAction. Haven't seen too many examples of how these things are used so if anybody has experiences/thoughts on this to share it would much appreciated.
Thanks!


Junilu - [How to Ask Questions] [How to Answer Questions]
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
No, I don't think so. You will still want to have BaseActions to provide common functionality to your Actions. However, Interceptors are useful for declaratively tacking on orthogonal services to your application easily. It is a poor man's AOP with a very limited pointcut selection. Therefore, I don't see Interceptors replacing BaseActions any more than I see AOP replacing Inheritance.
If you are interested in Interceptors then I suggest you checkout XWork/WebWork2... it is built into the framework and they did a much better job of it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interceptors vs. BaseActions