Announcement Announcement Module
No announcement yet.
Intercepting FacesServlet service()-method Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • donneo
    started a topic Intercepting FacesServlet service()-method

    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!

  • donneo
    Thanks for the quick answer. Does anybody see another way of getting around Tomcat handling this exception?

    Leave a comment:

  • Marten Deinum
    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.

    Leave a comment: