• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP question

 
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic