Log out functionality

In creator there is a method to destroy session bean. But how we can build log out functionality because if a user presses back button on next page then it should provide authentication error
[205 byte] By [anikhindi] at [2007-11-26 10:39:42]
# 1

The following info is from http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/sco pes.html

To programmatically end a session, call session.invalidate()

To set the amount of time before a session times out use the session-timeout tag in the session-config. For example,

<session-config>

<session-timeout>10</session-timeout>

</session-config>

jetsons at 2007-7-7 2:51:07 > top of Java-index,Development Tools,Java Tools...
# 2
Okay... so I have some logoff cleanup processes that I want to run when the user closes the browser. How can I determine when this happens and call session.invalidate() plus my other methods?
Tosa_Developer at 2007-7-7 2:51:07 > top of Java-index,Development Tools,Java Tools...
# 3

Closing a window or exiting the browser does not submit a page so there is no way for the web application on the server end to know automatically that this has happened.

You might want to search JavaScript forums to see if there is some type of JavaScript for detecting that the browser is closing and thus navigating to some servlet that invalidates the session.

jetsons at 2007-7-7 2:51:07 > top of Java-index,Development Tools,Java Tools...
# 4
Thanks!
Tosa_Developer at 2007-7-7 2:51:07 > top of Java-index,Development Tools,Java Tools...