tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: set tomcat max session allow
Date Sun, 04 Jan 2009 15:53:17 GMT
> From: cw [mailto:second_comet@yahoo.com]
> Subject: set tomcat max session allow
>
> may i know is there any guidelines/info on how to set maximum
> limit of sessions allow for each webapp and redirect user to
> a static html page is exceeded .

I don't believe there's any configuration mechanism for this capability.  You can implement
an HttpSessionListener in conjunction with a fairly simple filter or valve for the webapps
of interest to limit the number of sessions per webapp.  See section 10 of the Servlet spec
for details about event listeners:
http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index2.html

The listener cannot stop a session from being created; it would simply maintain a count of
active sessions for the webapp.  The filter or valve should be the first item in the request
processing chain, and it would have the responsibility of checking the count maintained by
the listener and deciding whether to proceed with the request or forward/redirect to an error
page.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message