Usually, it is a bad idea to do these thing inside a JSP(or View). Front Controller is where you want to do all these tuff. Sure, you can query the session object before you invalidate its or just try/catch IlligalStateException and ignore it.
Danny Trieu Internet Business Group Downey Savings and Loan Association, F.A. [EMAIL PROTECTED] (949) 509-4564 "The beginning of knowledge is the discovery of something we do not understand." - Frank Herbert (1920-1986) "The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance." - Confucius (551-479 BC) -----Original Message----- From: Antony Paul [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 3:38 AM To: struts Subject: session.invalidate() throws exception. Hi, Calling session.invalidate() in index.jsp throws this exception java.lang.IllegalStateException: getAttribute: Session already invalidated at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.jav a:954) at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessi onFacade.java:171) at org.apache.struts.taglib.html.FormTag.renderToken(FormTag.java:641) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:513) at org.apache.jsp.index_jsp._jspService(index_jsp.java:97) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) How to change this behavior. Better if possible to do some house keeping before invalidating session like if a valid session and data is present in session then go to a certain page. rgds Antony Paul. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and any attachments are for the intended recipient(s) only and may contain privileged, confidential and/or proprietary information about Downey Savings or its customers, which Downey Savings does not intend to disclose to the public. If you received this message by mistake, please notify the sender by reply e-mail and delete the message and attachments. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

