Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page Expired but Session is active

 
dinesh rackson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i have a problem,

In my application when i click, a process starts and it keeps running for long, but after exactly 60 minutes the web page displays "The page cannot be displayed" , but the process is still running in the server.
Only the page expires, the session is still alive and active. i clicked back and clicked on some other link and it opened, so session is not invalidated.
my requirement is the page should not get expire after 60 minutes since my process will take 2-3hrs and then show user the result.

how to solve this issue, is there any internet settings to configure page expiring??
i use tomcat as server for my application.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that the page you're viewing when you hit the back button wasn't a cached version?
 
BABUN GHOSh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
destroy of session object,responsibility of web container..
 
dinesh rackson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
Are you sure that the page you're viewing when you hit the back button wasn't a cached version?


hitting back in IE takes me to previous page, but from then i was able to click on other links which can be done only when session is valid...
 
dinesh rackson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by BABUN GHOSh:
destroy of session object,responsibility of web container..


as said before.. the session is not destroyed.. its still alive and active.. only the page gets expired..
 
dinesh rackson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
way back in 2005 the same question was posted by someone but no answer to it..
http://www.coderanch.com/t/361864/Servlets/java/Long-process
 
dinesh rackson
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anybody has answer to this???
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my requirement is the page should not get expire after 60 minutes since my process will take 2-3hrs and then show user the result.


You appear to be trying to conduct a long running process within a single request/response cycle. This is a VERY BAD IDEA as the intent of the servlet design is that request/response cycles should be completed quickly.

The subject has come up frequently in these forum discussions. The solutions is to start the long running process in its own Thread and to use the request/response cycle to monitor the process. Do a search for long running process in servlets to find extensive discussions.
Bill
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's very true William. Thank you for the same.

Even in the thread what dinesh (OP) has mentioned, there is an answer given by Gregg Bolinger, a sheriff! -- which is exactly similar to yours!

This should be efficient and quite reasonable!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic