This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP page time out

 
SaiPrasad Jukalkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic