This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes progress bar and timeout functionality for file upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "progress bar and timeout functionality for file upload" Watch "progress bar and timeout functionality for file upload" New topic
Author

progress bar and timeout functionality for file upload

Karan Jain
Ranch Hand

Joined: May 30, 2007
Posts: 82
Hi,
I am uploading a file using commons file-upload.
I will upload the file on the server, do some processing on the file data, persist into database and then send a response back to user with file uploaded successfully with or without errors.
If error occurs i need to delete the file from the server and remove some rows from the database.

While uploading and processing the file on the server i need to show the user some modal dialog box which will give the progress bar or at least a gif image with "Processing..." kind of text. The important point, I need to show the dialog while Uploading and PROCESSING the file. I also need to timeout the upload request if uploading and processing takes more than 3 mins.

I am not sure how can i send a request on the server still show some dialog on client side while processing is going on server?
Any code will definitely help...

Thanks...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

See http://www.coderanch.com/t/364667/Servlets/java/Inremediate-page-while-processing


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Karan Jain
Ranch Hand

Joined: May 30, 2007
Posts: 82
Thanks a lot for the quick reply...
I think i am looking for this kind approach only but i need to show the main window too and on top of it i need to show this dialog (of maybe a small window) saying processing... and when this small window is open you should not able to go to the main window (modal functionality).
Can this can also be achieved?
Else i will use your approach showing an intermediate page...

thanks!!!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: progress bar and timeout functionality for file upload