aspose file tools*
The moose likes Servlets and the fly likes JSP page time out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP page time out" Watch "JSP page time out" New topic
Author

JSP page time out

SaiPrasad Jukalkar
Ranch Hand

Joined: Feb 20, 2001
Posts: 79
hi,
i am accessing a jsp page from weblogic 6.1, this page processes a lot of records, after 10 minutes of process, the jsp page on the browser times out and displays the Page Not Found error on the browser..
can anyone discuss the problem and give me an solution.
thanx in advance
saiprasad.


JSP
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Originally posted by SaiPrasad Jukalkar:
hi,
i am accessing a jsp page from weblogic 6.1, this page processes a lot of records, after 10 minutes of process, the jsp page on the browser times out and displays the Page Not Found error on the browser..
can anyone discuss the problem and give me an solution.
thanx in advance
saiprasad.


Ten Minutes!?!? Snoozarama. My suggestion would be to build your application to only process and display a certain number of records at a time. You are really going to upset your users to the point where they probably won't use your app if they have to wait for such a huge transaction to finish before they see any results.
SaiPrasad Jukalkar
Ranch Hand

Joined: Feb 20, 2001
Posts: 79
hi jason,
i want to put this problem in more specific manner.
in my page, i dont have to display anything to the user, he will start a process through this form, after completion of this process, user can see the log file, my pressing a view log button, this button will be disabled, when the process is going on, as the process is taking too long, this page is going for a time out and displays "The Page Cannot be Displayed". because of this reason, when user want to view the log, he cannot do so.
i would like you to discuss this as elaborately as you can.
thanks
saiprasad.
Thomas Mcfarrow
Ranch Hand

Joined: Jul 09, 2001
Posts: 137
Hi,
One suggestion would be to have the browser refresh every 5 minutes or so. This will prevent the browser from timing out.
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 566
i don't know how but i would have thought that you could sort out some sort of asynchronous process which the user kicks off but doesn't have to wait around for - and maybe at the end of the process, send the user an email.


I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Like Adam said, having the app send an email isn't a bad idea. Another thing you might do is have one jsp which starts your process, and another jsp which will report the status of the process, giving you a link to the log file if the process is complete.
SaiPrasad Jukalkar
Ranch Hand

Joined: Feb 20, 2001
Posts: 79
yeah i agree with Adam's idea,
in this scenario can i use threads, where JSP pages thread creates second thread and runs the process in this thread and with the META tag and i set the refresh time to every 5 minutes,
is this a correct way of solving the problem, if you have any better way of doing this pl discuss.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

My browser times out a lot faster than 10 minutes - proably more like 2 or 3. Which is just as well.
It's been said before, but it bears repeating: A WEB APPLICATION IS *NOT* A CLIENT/SERVER PROGRAM. Browser requests are always request/response transactions. 1 request, 1 response. No 1-to-many, many-to-1, interactive or long-running processes.
If you DO have a long-running process - and the last major system I worked on did - you should make it a back-end service that can be passed requests and queried for status. While you could spawn a thread in a Servlet, the basic rules for servlets make that a very limited solution.
There are a number of ways to accomplish what you want to do, some of which have already been mentioned, but you can't just code a servlet and go - it will require a certain amount of complexity. This isn't Java's fault - it has to do with the basic operation of http.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP page time out