jQuery in Action, 2nd edition*
The moose likes Spring and the fly likes Difference between AOP and Interceptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Difference between AOP and Interceptor" Watch "Difference between AOP and Interceptor" New topic
Author

Difference between AOP and Interceptor

Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
If a project is designed using Spring and Struts2, can somebody tell when to use Interceptor in Struts2 and When to use AOP in Spring. This is always confusing us.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Use S2 interceptors when it's something related only to the normal S2 flow and/or need access to S2 infrastructure. Use AOP for everything else.
Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
need access to S2 infrastructure


David could you please give me an example for this.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Something on the value stack, like the action.
Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
Got the point. Thanks for your valuable time David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between AOP and Interceptor
 
Similar Threads
struts2 problem
AOP
Struts2 with Spring AOP
How to Configure interface Preparable in Struts2..
struts2 + interceptor