This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Setting Request Timeout in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Setting Request Timeout in Tomcat" Watch "Setting Request Timeout in Tomcat" New topic

Setting Request Timeout in Tomcat

Tripp Bishop

Joined: Aug 23, 2002
Posts: 21
I'm not sure if this is a tomcat or JSP question so if this is misplaced, my apologies.
I have a struts action that performs a lot of work and occasionally takes a while to complete its tasks. This cause request timeouts and I was wondering if there was a way to specify a request timeout in the tomcat web.xml or server.xml. If not, is there a programmatic way of doing this? There is in the dread ASP world (server.timeout = 600, for example). Just wondering if there's a similar construct in the JSP world.
Thanks in advance,
vishal raina

Joined: Feb 17, 2009
Posts: 2
You can change the connectionTimeout value in server.xml

<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector URIEncoding="UTF-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="7777" redirectPort="8443"/>
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Tripp, how long it takes to time out?
I agree. Here's the link:
subject: Setting Request Timeout in Tomcat
Similar Threads
session values
JSP in Windows XP home
Share data between jsp and servlet without using request or session
Capturing Session TimeOut?
tomcat session timeout