| Author |
Page Expired but Session is active
|
dinesh rackson
Greenhorn
Joined: Oct 22, 2007
Posts: 9
|
|
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
Joined: Dec 11, 2004
Posts: 13410
|
|
|
Are you sure that the page you're viewing when you hit the back button wasn't a cached version?
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
BABUN GHOSh
Greenhorn
Joined: Apr 03, 2008
Posts: 7
|
|
|
destroy of session object,responsibility of web container..
|
Aveek
|
 |
dinesh rackson
Greenhorn
Joined: Oct 22, 2007
Posts: 9
|
|
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
Joined: Oct 22, 2007
Posts: 9
|
|
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
Joined: Oct 22, 2007
Posts: 9
|
|
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
Joined: Oct 22, 2007
Posts: 9
|
|
|
anybody has answer to this???
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12265
|
|
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
|
Java Resources at www.wbrogden.com
|
 |
Raghavan Muthu
Ranch Hand
Joined: Apr 20, 2006
Posts: 3327
|
|
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!
|
Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
|
 |
 |
|
|
subject: Page Expired but Session is active
|
|
|