Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting connectionTimeout in Tomcat

 
Prasad Darsi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using tomcat 5.5, apache 2 and jk2 to connect apache to tomcat.

One of the jsp page that I am accessing in my application is taking about 2 hours to complete the
process (because it is running an oracle procedure which processes an entire month's data).
When I am try to access the page, it is showing the progress in status bar of the browser exactly for an hour and then showing
the message 'The page cannot be displayed' after that period.

I tried setting the connectionTimeout attribute in tomcat's server.xml file to "0" but it didn't work.
Later I read on the net that one has to set it to "-1" to disable the connectionTimeout. But this also didn't work.

Is there any other way to achieve this, so that connection remains open atleast for 2 hours?

Thanks in advance..
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a limit to how much you can control a browser.

For long running processes, most people use a polling page or frame.

  • Kick off the process
  • Immediately return the user to a status page.
  • Have the status page refresh periodically using a meta-refresh tag or JS.
  • When it refreshes have it check the status of the process via a variable in session or application scope or a database call.
  • Once the long running process is done, have it update whatever it is you're checking.
  • When the polling status page sees that the process is complete bring the user to the 'complete' page


  • This also helps the user diffrentiate between a successful kickoff of the process and a hung browser.

    There are variations using frames that allow the user to keep working in your app while this is going on in the background. When the process is done, you can trigger a javascript popup message from the hidden frame.
    [ January 20, 2005: Message edited by: Ben Souther ]
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic