one way would be to give a hint in the message window like

At 28.8 kbps -> 1 MB takes 2 minutes or something like that.

There are some fancy sites that even tell you what is your
connection speed etc. If their technique is simple, perhaps
the above message can include an approximate time estimation.

Writing an applet or activeX control will take time (if there
are not any free ones available). And then you have to
think about signing the applet, browser security settings,
proxy compatibility etc.

Regards,
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 4:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Oreilly File Upload Problem


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

___________________________________________________________________________
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