Announcement Announcement Module
Collapse
No announcement yet.
How to log out after sending a page? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to log out after sending a page?

    I have a program trigger an action in my JSF 2.0 application.

    In particular, the program tries to GET a JSF page, gets redirected to the Spring Security standard log in, does log in, and then GET the original JSF page again, passing some parameters in the URL. Unfortunately, said program does not log out. How can I log out anybody going to this particular page, but first send them said page?

    I tried
    Code:
    FacesContext fc = FacesContext.getCurrentInstance();
    ExternalContext extContext = fc.getExternalContext();
    HttpSession session (HttpSession) extContext.getSession(false);
    fc.renderResponse();
    fc.responseComplete();
    session.invalidate();
    but that sends the session expired page instead of the actual page to the program.

    Any ideas?

    Thanks,

    Robert

  • #2
    Why don't you create a simple filter which gets executed after your request and invalidates the request session. Seems a simpler approach.

    Comment

    Working...
    X