This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Servlets and the fly likes Looong servlet operations Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Looong servlet operations" Watch "Looong servlet operations" New topic
Author

Looong servlet operations

Andrew Sweeney
Greenhorn

Joined: Jan 11, 2002
Posts: 26
Greetings all,
I'm developing a servlet to be called from a JSP. This particular servlet will take a good amount of time, due to some processing needs. I'm trying to find a way to update the user while this processing is taking place. I don't need a percentage or amount of time, as the processing is not consistent per each request. All I need is something to inform the user that the process is continuing. I have seen similar problems on the JDC forums, but I have yet to see a satisfactory solution. Any ideas?
Thanks!
Aaron Dressin
Greenhorn

Joined: May 10, 2002
Posts: 29
You could always use Javascript and DHTML to popup a <DIV> with a background color and some text on it (or even an animated gif).


-Aaron
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14568
    
    7

"long-running servlet" is an oxymoron.
As I've mentioned before, the best way to think of a servlet is not as a program you can chat with, but as a subroutine call made by the client (RPC, if you will) that will time out if the results don't come back soon enough. And, in any event, depending on the design of the client and server systems, the client may not display ANYTHING AT ALL until the servlet has finished executing - which kind of makes putting up a "please wait" message futile.
If you've searched earlier discussions on this topic here in the JavaRanch Servlet forum and were not satisfied with the solutions suggested, I can only say "I'm sorry". The limitation is not in Java, it's in how HTTP works.


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: Looong servlet operations
 
Similar Threads
Server Time out? how to catch it?
Dynamic Progress Bar& status messge based on the Server side process
Server side process Statements line by line display in JSP
how to show a message while processing is going on
Forward to handler