Invalidating a session in jsp
I've attached an example that shows a command button that logs out by navigating to a JSP that then does the session.invalidate() and then redirects to another page. Illegal State Exception: get Attribute: Session already invalidated at org.apache.catalina.session.Standard Attribute(Standard Session.java:1011) at org.apache.catalina.session. Standard Session Attribute(Standard Session Facade.java:109) at com.icesoft.faces.webapp.xmlhttp.Hi, Sorry, we should have a much more clear best practices for this sort of thing.You can't navigate or redirect within the JSF context right after invalidating the session, but what you can do is still redirect in a JSP context. focus=undefined&icefaces ID=Ekfp Ttz4YPgnw-Ax Be Iarg,&view Number=1,&rand=0.3151381175022874 SEVERE: Exception: [Thread Id=37] get Attribute: Session already invalidated I just don't know where that try Login(-) method resides so I don't know what 'this' refers to.There is nothing wrong with using 'this' at all, but I suspect that you are storing an object of the user as an attribute (instance variable) of your servlet.I trided some trick with getting the externalcontext and doing a send Redirect on the response but that didn't work... We'd especially like someway to redirect to a login page when the server side session expires.
In fact, I renamed my xhtml files to jspx and changed my default suffix to jspx just so that I could run JSP commands (i.e. I've tried many many things and cannot get this to work properly. I need to be able to invalidate the session so that when the next user logs in the, component tree state will have been reset (e.g. Hi, I'm trying to logout from my application by clearing the Acegi security context and killing the session in order to clear my session-scope spring-based application beans but the navigation back to the login page doesn't (perhaps not that surprising) work after that.Is there any way of redirecting from within ICEfaces?When you authenticate a user, you can simply add the username as a String, or an object of a user representation to the session.This could be something like That's not something even close to what Paul suggested.