Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Limiting connections to Tomcat

Posted on 2003-03-13
3
Medium Priority
?
248 Views
Last Modified: 2011-10-03
Hi All,

I am using Tomcat 4.1.x and would like to provide a customized page error to the users when some thread/connection limit is reached. Now we are setting minProcessors="50" maxProcessors="375" acceptCount="10" on server.xml but can´t find a way to configure this error page.

I found mod_vhost_limit for Apache but again could not find how to configure this error page.

Any ideas?

TIA

Eduardo Rebouças
McFox Software Design
0
Comment
Question by:ereboucas
1 Comment
 

Accepted Solution

by:
djochim earned 1000 total points
ID: 8172580
First in tomcat's server.xml for your context there is a manager tag.  There you can set an attribute for maxActiveSessions.  When the maxActiveSessions is reached Tomcat throws and IllegalStateException.  Then I put in the web.xml of my webapp an <error-page> tag which catches the IllegalStateException and goes to a particular HTML.
Also a note you should use and HTML page or JSP with the session disabled.  When I first tried with a JSP it threw the IllegalStateException again and I didn't know what was happening but I guess JSP by default ask for the session.
Hope that helps, if I need to explain something better tell me.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question