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

Reply via email to