Surely you cannot predict the length of time the upload is going to take this way, it would simply show that the file is going across? I'm guessing the only way that I could predict the progress correctly would be to get a certificate so I could access the users hard drive via an applet or something, that would be a completely different ball game then though.
Thanks, Stuart Stephen -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of G.Nagarajan Sent: 10 January 2002 15:04 To: [EMAIL PROTECTED] Subject: Re: Oreilly File Upload Problem One way would be to open a new javascript window before posting the form. The window can show some message like "upload in progress with an animated gif like the windows copy file". Then in the new page, in the body onload javascript event, the progress window can be closed. As for the maximum file size problem, what I do is I have two sizes 1 -> set the fileUpload Servlet max size to say 25 MB 2 -> max size for client is 5 MB. so when the client attempts to upload a file between 5 MB and 25 MB, I will upload the file but display an error message and delete the file after uploading. In the case of files > 25 MB, the browser will tell "connection terminated with server" or something like that. But then we can put some big messages telling that max size is 5 MB... hope this helps, Nagarajan. -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Stuart Stephen Sent: Thursday, January 10, 2002 3:00 PM To: [EMAIL PROTECTED] Subject: Oreilly File Upload Problem Hi, I've written a servlet page running on the Tomcat server that allows me to upload a file to the webserver. However, if the size of the file is too large to be uploaded for some reason it appears that I can't catch the exception that the Oreilly API throws. I would like to catch this and print out an error page, is there a special way of doing this? Also, if I were to want to create a progress bar for the file upload, how would I go about this? Is it possible? Thanks, Stuart Stephen ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
