• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

How to show Progress Bar when the servlet is processing uploaded file to it

Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have one jsp form that it has upload file input. The file is being uploaded to the servlet and servlet is reading the file successfully. The servlet is processing the data of file doing some stuff after reading the file. for me I can't assume how much time the servlet is going to take because as I told servlet is processing data of the file so it might be big data with other files and will take longer time. what I need is I want to show to user such progress bar that indicates to him the server is busy processing the uploaded file.  how is that ? anyone can help me please.
Posts: 28271
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That progress bar would have to be displayed by the browser; you'd want to display something which blocks the user from clicking on the HTML displayed in the browser until it receives a response.

Of course you'd have to do that in JavaScript so I'll move this thread to the JavaScript forum for you.

I remember doing this several years ago -- one necessary condition is that your request has to be sent via AJAX, otherwise it's not your code which is waiting for the response. I can't remember in detail how I did it but googling javascript progress bar might well lead you to solutions.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic