Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Processing

 
Ravi Agarawal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Servlet takes a lot of time to process. I want to show another servlet while it is being processed. How can i do this.
Please reply soon
Thanks in advance..
Ravi
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For any process that takes a lot of time, you should consider doing it outside the servlet Thread. Your servlet can start the process and report to the user that it has been started. The object conducting the process can be attached to the session or maybe just have some sort of identifier attached to the session.
The immediate response HTML page can have a timer that tries to reload every N seconds (probably in JavaScript) eventually the long process completes and you can write the result page.
Bill
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ravi Agarawal:
My Servlet takes a lot of time to process. I want to show another servlet while it is being processed. How can i do this.

Some times back i had posted a message with subject "wait screen" ,please try to locate that thread which will answer ur question.
Regards
Balaji
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic