I'm trying to upload a .jpg file using
<form method="post" enctype="multipart/form-data" action
="servlet/Uploader">
<input type="file" name="logo" size="30">
<input type="submit" value="Submit">
</form>
The Uploader servlet instantiates a com.oreilly.servlets.MultipartRequest
object and tries to read the form data.
Netscape 6 and IE5.5 both give me an exception
java.io.IOException: Corrupt form data: no leading boundary
at
com.oreilly.servlet.multipart.MultipartParser.(MultipartParser.java:152)
at
com.oreilly.servlet.multipart.MultipartParser.(MultipartParser.java:74)
at
com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:123)
Interestingly, IE5.5 quits at this point. Netscape, however, actually
writes a file to my temp directory called something like formpost-1. In
this file (when opened with a text editor) contains
Content-type: multipart/form-data; boundary
=---------------------------63341846741
Content-Length: 2690
-----------------------------63341846741
Content-Disposition: form-data; name="logoFile"; filename
="logoLeesCarpet.jpg"
Content-Type: image/jpeg
<unprintable characters here>
-----------------------------63341846741--
Can anyone point me in the right direction?
TIA
Joseph Polanik
[EMAIL PROTECTED]
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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