File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Weird error uploading file via https Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Weird error uploading file via https" Watch "Weird error uploading file via https" New topic

Weird error uploading file via https

Jon Pincott

Joined: Jul 28, 2004
Posts: 17

I've got a form that looks a bit like this :

(i.e. a file upload form that submits to a servlet on another server via https.)

The problem is, I'm getting a "page not found" error. I think it's got something to do with certificates, because if you try to GET the servlet (e.g. browse to it directly), you are prompted to accept the certificate. If you try to POST to the servlet, i.e. using the form, then the certificate acceptance dialog does not display any you get a "Page not found" error.

However, if you change the input type from "file" to "text" and submit the form, the dialog box is displayed. So, what is it about using input type="file" that is preventing the certificate acceptance dialog from appearing, and how do I fix it?

Can anyone point me in the right direction?


Jon Pincott

Joined: Jul 28, 2004
Posts: 17
I've discovered this is a known problem with IE. One workaround is to include on the upload form a link to a resource (e.g. a gif) on the secure server. This allows you to accept the certificate before submitting the form.
I agree. Here's the link:
subject: Weird error uploading file via https
Similar Threads
session management problem with iframes
How to upload a file using servlets to a webserver
confused between attributes and parameters
loading one servlet from another servlet
Resource not found