Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » AspectJ AOP config with JSP
AspectJ AOP config with JSP [message #1053662] Tue, 07 May 2013 08:05 Go to next message
Extreme Java is currently offline Extreme JavaFriend
Messages: 6
Registered: November 2012
Junior Member
I have configured AspectJ in my spring application. Since my app is a legacy app which is using JSP scriptlet code for server side processing.

The problem I am facing is that I want to invoke an @AfterThrowing Advice when an Exception occurs in the JSP scriptlet code.

My Advice method signature as of now is:
    public class NotificationAdvice {  
        @AfterThrowing(pointcut = "execution(*", throwing = "error")  
        public void logAfterThrowing(JoinPoint joinPoint, Throwable error) {

In the above code, OtherBeanIntf is another Java bean which is working fine with this logging advice. Now how do I configure this advice to work with JSP scriptlet code too?

Re: AspectJ AOP config with JSP [message #1053790 is a reply to message #1053662] Tue, 07 May 2013 15:33 Go to previous message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 382
Registered: July 2009
Senior Member
Since JSPs are compiled separately from java classes, there are different things you need to do to weave them. Here is a tutorial that describes something that might work: (I haven't tried this myself).
Previous Topic:IllegalMonitorStateException using locks
Next Topic:ClassFormatException with AJDT and RAD 8
Goto Forum:

Current Time: Wed Feb 19 09:30:47 GMT 2020

Powered by FUDForum. Page generated in 0.03026 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top