Title: Uploading of File Through Applet
Hi Amit,
 
i did something similar.. I have an applet, that is signed for both IE and NS so that it can access the local file system and it allows the user to choose a file by poping up the java.awt.FileDialog.. Then get a handle to that file as a Random Access file, read the data as 500K size chunks (because HTTP might not allow higher sized chunks..)and send'em over thro the URLConnection.openConnection(new URL(http://hostname:8080/servlet/UploadTest"));
 
It worked perfectly..
 
Signing the Applet was a pain in the butt, otherwise everything else was quite simple..Infact we used SSL on the Server side.
 
Take Care
 
Jagan J
 
NB: i can't send the code snippet because i am consulting for a client and i have a proprietary code agreement with them.
 
 
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Amit Bhatnagar(CTS)
Sent: Monday, September 27, 1999 9:42 PM
To: [EMAIL PROTECTED]
Subject: Uploading of File Through Applet


Hi All,

        I want to upload a file on the Java-WebServer from a applet.
For that, I have got a Upload Servlet on the server-end which reads the
file send by the browser through the following HTML code ::

<form method="post" enctype="multipart/form-data"       action="http://hostname:8080/servlet/UploadTest">
        <input type=file size=20 name=filename>
        <input type=Submit value=Upload>
</form>

        I want to give this same HTML functionality through Applet.
Do anybody have some idea or code about how to do that ????

        I think, I will have to make header for the request which I will be sending
to the servlet. Is it right ??????

        Are there any other ways for uploading a file through Applet....???????

        Thanx in advance,

-Amit

Reply via email to