When Venkata Sudhir Kurapati asked

> Can anybody tell me if the user closed the window without logging out
> but pressing the X button of the browser, how do we close the
> session.

[EMAIL PROTECTED] suggested

> You can try with ONUNLOAD event.

I assume this is referring to the Javascript ONUNLOAD event, so I think I
should point out that MSIE is known to be unstable when using the Javascript
UNONLOAD event and timer events.

Apparently, the program context for the closed window tends to get deleted
while your script is still running, leaving the cpu trying to process air.

(All hail the exalted seg fault!)

So, the answer is, you just don't really have a good, general way to find
out when your user closes his/her browser window, which is one more good
reason to have your session expire after a reasonable time.

Default timeout is specified for the server in
tomcat-{$version}/conf/web.xml (extracting from the samples):

    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>

Default timeout for the web-app is specified in
{$webApplication}/web-app/web.xml using the same XML element and syntax:

    <session-config>
    <session-timeout>30</session-timeout> <!-- 30 minutes -->
    </session-config>

Note that the specification is in minutes, as the comment in the latter
indicates.

Joel Rees
Alps Giken Kansai Systems Develoment
Suita, Osaka





--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to