Results 1 to 3 of 3

Thread: Intercepting FacesServlet service()-method

  1. #1
    Join Date
    Nov 2009
    Posts
    2

    Default 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

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Nov 2009
    Posts
    2

    Default

    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
  •