Bug 53230

Summary: Allow custom error mapping when Manager's maxActiveSessions is exceeded
Product: Tomcat 7 Reporter: Thomas Rohde <tro>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Severity: enhancement CC: tro
Priority: P2    
Version: 7.0.27   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Thomas Rohde 2012-05-14 17:09:13 UTC
Tomcat 7.0.27

In ManagerBase an IllegalStateException is thrown when the configured maxActiveSessions attribute is exceeded.

This allows no customized error handling via configuration in web.xml.

See discussion: http://markmail.org/thread/xqjgdhf32gjrzjz2

Can be reproduced with the sample application:

Just set maxActiveSession="0" in ${catalina.base}/conf/context.xml

A configuration like this would be very useful:

Comment 1 Christopher Schultz 2012-06-06 00:03:25 UTC
ManagerBase now throws o.a.c.session.TooManyActiveSessionsException, which is a subclass of IllegalStateException.

Fixed in trunk and 7.0.x. Will be included in 7.0.28.

Proposed for Tomcat 6.0.x.
Comment 2 Konstantin Kolinko 2012-06-23 14:04:23 UTC
Backport applied to 6.0 in r1353128 and will be in 6.0.36.

I noted the following, while testing the patch for 6.0:

1). You will be able to configure custom error page for Servlets, such as

2). You will not yet be able to configure it for JSP pages, such as

For JSP pages the error is swallowed and logged in JspPageContext#internalGetPageContext(..)
and the user is presented with an empty page. Error handling does not happen.
-> I filed bug 53460 for this issue.