Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP question

 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a JSP page which should keep on displaying the message "processing your request,and should keep on checking the status of the processing request,after certain amount of time,if the process is taking too long to query the DB and return the result should time out.

How can I achieve this?

thanks,
Trupti
 
Sweet Turtle
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Trupti,

U can use <META HTTP-EQUIV="refresh" CONTENT="120;URL=http://<hostname>/ProcessingPage.jsp"> tag in your JSP which initates the DB call and waits for response. This will ensure your calling JSP to wait for 2 minutes for the response from DB, else will redirect to ProcessingPage.jsp which should show friendly message of "procesing your request".

Regards,
Sweet
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Sweet Turtle",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

The Waiting JSP should refresh after every couple of seconds.
Also the JSP is going to check one database column value,if the column is not set to a particular value after 120 seconds it should timeout..

thanks,
Trupti
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I expect you can work out how to make it refresh every couple of seconds using "Sweet Turtle"'s example. If you want it to time out after 2 minutes then you could count, say, 60 refreshes or, perhaps more accurately, check at the server-side on each refresh if 2 minutes has expired since the page was first served.

Jules
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!