Bug 53230 - Allow custom error mapping when Manager's maxActiveSessions is exceeded
Summary: Allow custom error mapping when Manager's maxActiveSessions is exceeded
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 7.0.27
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2012-05-14 17:09 UTC by Thomas Rohde
Modified: 2012-06-23 14:04 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
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.