I encountered the below exception displayed in page when calling "session.invalidate()" in jsp file even putting into the block "try...catch(Exception ex)...", any solution to this issue? Env: was 6.0 Thanks in advance!
[BSouther: Added line breaks to error message] [ January 03, 2007: Message edited by: Ben Souther ]
Can you help out us slower rustlers .... Is it bad news to add a reference to non-serializable object to the session? I know that such objects can't be moved from one JVM to another, but didn't know that there would be other problems ... ?
Tomcat's persistent sessions depend on sessions being serializable. If any object bound directly or indirectly to session is not serializable you might have problems shutting down or restarting your container.
In general, its a good idea to make sure all session data is serializable.
Servlet engines are allowed to serialize a session any time they want to - presumably for memory management or persistence or whatever - it is out of your control.
Therefore, to ensure portability and avoid mystery bugs, ensure that all references you store in a session refer to serializable objects.
Bill
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
a bit of art, as a gift, the permaculture playing cards