• 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

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

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
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
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.
 
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic