• Post Reply Bookmark Topic Watch Topic
  • New Topic

Progress bar in a JSP if the click/process takes time...  RSS feed

 
Gnanasekaran Sakthivel
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have an export process (exporting some data out of database into a text file). User clicks a link, give some input especially some fromto dates and browse a text file, then clicks ok. Now the export process starts. Sometimes it may take a while to complete this process.

As we are porting our application from Powerbuilder app... Users are used to seeing progress bar. Is there any way we can do progress bar here? Do we advice doing progress bar in j2ee-web-apps?

Other option they might be ok is... We can show a static message like "Process is in progress..." and change the message to "Process Complete" once it completes. Now the user does not want to sit in the page waiting, instead they would like to goahead with other links without them manually spawning another session/window. At the click we can open another JSP and keep in a separate HTTP thread. Is this a good idea?

Thanks in advance for your suggestions.
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could do it with AJAX. I have read an article on that, but I haven't tried it myself.

Check this
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66152
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is very difficult to do without Ajax. Using normal page submits, when you submit the request, the browser waits for the response. There is no way to have the browser responsive while it is waiting.

With Ajax, the request is submitted asynchronously so the original page remains active.

If you are a so inclined, this is one of the examples I wrote about in the usability chapter of Ajax in Practice.

Even with Ajax, setting up the server-sode code so that it can accurately report the progress of an asynchronously running process is a challenge.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!