tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Yang <yga...@yahoo.com>
Subject Re: session expiring too quick
Date Fri, 03 Mar 2000 22:46:16 GMT
Brennan O'Shea wrote:

> To anyone who can help:
>
> I'm running Tomcat 3.1 in NT environment.  I have the following settings in my
> "server.xml" file:
> defaultSessionTimeOut="500"
>
> and the following in "server.dtd":
> defaultSessionTimeOut NMTOKEN "500"
>
> and my sessions time out in just a few minutes (apx. 2-3 minutes).  These were
> originally set to "30" and I changed them to "500" and haven't noticed any
> change.  Can someone tell me if this is in fact the setting to change in order
> to increase the default session timeout and also what units (minutes) this
> number is in.  Has anyone else had this problem?
>
> Thanks,
> Brennan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

Get the latest build.

In my web.xml, the default timeout is 30 (minutes),
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>


so http://localhost:8080/examples/servlet/SnoopServlet
returns:
...
Session Last Accessed Time: 952123105698
Session Max Inactive Interval Seconds: 1800
...

When I change it to 60, the result is:
...
Session Last Accessed Time: 952123188568
Session Max Inactive Interval Seconds: 3600
...

Also, you can set your own timeout interval in your servlet or jsp. Here is a
sample:
<HTML>
<HEAD>
        <TITLE>JSP session page</TITLE>
</HEAD>
<BODY>
<%
    session.setMaxInactiveInterval(60);
%>
</BODY>
</HTML>

Here, 60's unit is second.



Mime
View raw message