Dear Java dancers,

    I would like to upload a file from an applet to a JSP page. I've downloaded a 
component called JspSmartUpload and it works very well.
    In fact, here is my problem...

    First I use an HttpURLConnection which connects to the JSP page :

URL actionURL = new URL("myPage.jsp");
HttpURLConnection con = (HttpURLConnection)actionURL.openConnection();
con.setRequestMethod("POST");
con.setDoOutput(true);

    Then I open a printwriter on that connection to post the parameters :

  PrintWriter output = new PrintWriter(con.getOutputStream());
  output.println("File_Name=" + fileName);

  This is suppose to do exactly the same as HTML code
   <form method="POST" action="myPage.jsp">
        <input type="text" name="File_Name">
    </form>

   According to this, how can I now reproduce the output of a HTML form which also 
post a file ?

   <form method="POST" action="myPage.jsp">
        <input type="text" name="File_Description">
        <input type="file" name="File_Name>
    </form>

    Any idea ?

    Best regards,

            Franck


���`����,��,����`����,��,����`����,��,����`����

FRANCK RAGEADE
Skill Group e-Business

SBA 67 - France & Abroad
Cap Gemini France - Division Rh�ne-Alpes

11, Chemin des Pr�s
ZIRST 4403
38944 Meylan , France

LoginId: frageade
Email: [EMAIL PROTECTED]
Phone: +33 (04) 76 52 64 31
Fax: +33 (04) 76 52 62 01

���`����,��,����`����,��,����`����,��,����`����

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to