-
Nov 30th, 2009, 08:40 AM
#1
Intercepting FacesServlet service()-method
Hi friends!
I'm working on a webapplication using Spring 2.5 and JSF 1.2 (Sun RI). When a session expires, JSF throw a ViewExpiredException from its service() method on the next user action.
Until now, we configured our servlet container to show a specific error page on this Exception, unfortunatly the Exceptions still get written to the logfiles this way.
I learned about Spring AOP last week on a seminar, and now my idea is, to intercept the FacesServlet service Method with a pointcut.
I'm not exactly sure, if that's possible, obviously I cannot work with Annotations, but am XML defined pointcut would get around this. The thing is, i don't have a bean definition of the FacesSevelet and I'm not sure if this is possible at all.
Any thoughts on this? Or another clever idea on that topic?
Thanks in advance!
Reinhard
-
Nov 30th, 2009, 10:15 AM
#2
You cannot, it will never work. Spring AOP can only intercept methods on beans defined in the applicationcontext, it cannot intercept method calls to objects outside of the application context.
-
Dec 1st, 2009, 02:17 AM
#3
Thanks for the quick answer. Does anybody see another way of getting around Tomcat handling this exception?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules