You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Wolfgang Werner <ww...@picturesafe.de> on 2000/01/24 19:02:59 UTC

Sessiontimeout: How to set?

Sorry, I know this is a developer list, BUT I have a very urgent problem

setup	: latest cvs tomcat / Apache 1.3.9 / Windows NT 4.0 SP 6a / Sun jdk
1.2.2-001

In my Web App i have specified:

<web-app>
	<session-config>
		<session-timeout>
			4
		</session-timeout>
	</session-config>

[...]

and would expect a session timeout of 4 minutes according to the specs. My
session objects are unbound from the session after approxemately  110 seconds,
there is no change in this behaviour with different settings in the xml-file.

Do I edit at the wrong place? Maybe, is only the session timeout of the first
web-
application used?

I do have a presentation in ~ 6 hours, so help is VERY appreciated!

Thanks a lot,

	Wolfgang


RE: Sessiontimeout: How to set?

Posted by Wolfgang Werner <ww...@picturesafe.de>.
> <%@ page import="org.apache.tomcat.core.ApplicationSession" %>
> <%
>     ((ApplicationSession) session).setMaxInactiveInterval( 10800 );
>     out.println( session.getMaxInactiveInterval() );
> %>

This helped! Thanks a lot, 

Wolfgang 

Re: Sessiontimeout: How to set?

Posted by Alex Cruikshank <al...@epitonic.com>.
At 07:02 PM 1/24/00 +0100, you wrote:
>Sorry, I know this is a developer list, BUT I have a very urgent problem
>
>setup   : latest cvs tomcat / Apache 1.3.9 / Windows NT 4.0 SP 6a / Sun jdk
>1.2.2-001
>
>In my Web App i have specified:

I think this is a bug, but I haven't had time to figure out what is going 
on and declare it to the group as such.  I have the same problem.  The only 
work-around I know of is to run a JSP page that looks like this:

<%@ page import="org.apache.tomcat.core.ApplicationSession" %>
<%
    ((ApplicationSession) session).setMaxInactiveInterval( 10800 );
    out.println( session.getMaxInactiveInterval() );
%>

This sets the session time out directly.  You have to run it every time the 
server is restarted.  If you are running a CVS build, you might be able to 
change classes/org/apache/tomcat/shell/deployment/server.xml.  I think that 
this is the file that is clobbering the settings in the server.xml in 
tomcat's directory, but I'm not sure that changing it will fix the 
problem.  Hope this helps for now.

- Alex Cruikshank
Senior Software Engineer
Epitonic.com