On 2002-12-19 "MURAT BALKAS"  wrote:
> Hi,
>
>       I'm trying to write a FileUploadServlet. It'll be called from a
> direct link like http://my.server.com/servlet/FileUploadServlet?file=c:
> \test.txt. But, I get following error :
> java.io.IOException: Posted content type isn't multipart/form-data
>
>       Is it possible to use MultipartRequest class as above or do I have
to
> use another class?
>       How can I give the enctype as multipart/form-data from the direct
> link?

You can't use a link. You have to use a form with enctype
multipart/form-data and with <input type="file" name="file"> -tag

example:

      <FORM action="/servlet/FileUploadServlet" ENCTYPE
="multipart/form-data" method="POST" TARGET = "">
     <input type="file" name="file">
      </form>

- Toni


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to