• 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

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys

Need a little help with 'prettying' up my system a bit.

I have a system where the user enters a job number in a JSP which is posted to a Servlet, the Servlet then goes off looking through a directory structure for a matching job and retrieves the files, documents etc from that folder and displays them toi screen. Now all this works but for one slight problem... It takes around 10+ seconds for a response (probably due to directory size and network speed), so for 10 or more seconds the user has nothing to see, so it's easy to presume nothing happened and to either give up or start attacking the 'submit' button with clicks. Sure there's the progress bar at the bottom of IE but how of have we seen that sit at 25% claiming to be loading a webpage!

What I need is a way of, on the POST the JSP loads some sort of PLEASE WAIT (this can be a cheesy animated GIF) which stays until the POST redirects to the results page. Is there any way of doing this from the Servlet, or do i need to adapt a JS function?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not a Java question, but not really right for HTML and JavaScript, either. Still, the techniques will be independent of server technology, so off we go.
 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure but progress bar is one of the design pattern in Ajax. Let us know if you find something like that.
 
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When the user click submit first take them to a pleasewait.jsp where you can display your creative animated please wait or progress bar gif image. In its body tag write onload event where you actually submit to the real action.



I implement this way in one of our project.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic