3

I want to show upload progress bar for my uploads using servlet. I tried Ajax, iFrame technique. The page is not reloading and the file also getting uplaoded. But, progress bar is not coming. Is there any jQuery progress plugin available for java servelts?

Thanks!!

  • http://stackoverflow.com/questions/254719/file-upload-with-java-with-progress-bar – jmj Nov 16 '10 at 08:48
  • possible duplicate of [Progress bar for File Uploading?](http://stackoverflow.com/questions/4192858/progress-bar-for-file-uploading) – Adeel Ansari Nov 16 '10 at 10:02
  • @ Adeel Ansari: Sorry, both looks like same. Here i asked for plugin, but no positive response. So, now i wants to implement it on my own. Thats why asked another to understand the server side process. –  Nov 16 '10 at 10:13
  • @CS 1.6: Sorry, but I couldn't revoke that close vote now. :( – Adeel Ansari Nov 16 '10 at 10:22
  • @ Adeel Ansari: No Problem. Cheers! –  Nov 16 '10 at 11:14

1 Answers1

4

I strongly recommend jQuery Uploadify plugin for ajax file uploads. It comes with a progress bar as well. You can find an example on their demo page.

Integration with JSP/Servlet isn't that hard. You can basically keep the servlet code for "regular" file uploads unchanged. I've however ever written a mini tutorial in an answer here (check the "update" part of the answer), you may find it useful as well.

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • I should have seen your answer yesterday night. Sleepless night. Again thanks man :) –  Nov 16 '10 at 13:25
  • I used Uploadify. Everything works fine, except one thing. Its show the % while uploading, its stops in some number like, `64`, `96`. But the file was uploaded. I mean the notification is not showing `Completed` after the upload finishes. Do you have any idea about this issue? –  Nov 16 '10 at 14:19
  • Haven't seen this before. Which browser? Tried different ones? Which Flash plugin version? Tried to update it? This by the way an Uploadify/Flash issue, not a JSP/Servlet issue. – BalusC Nov 16 '10 at 14:37