Check-out Jason Hunter's com.oreilly.servlet package at servlets.com.
John Kirby
DISC
-----Original Message-----
From: Lame, John [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 09, 1999 10:50 AM
To: [EMAIL PROTECTED]
Subject: Processing Uploaded Files
I'm looking for sample code on handling multipart/form-data.
For instance, consider the following form.
<form method=post action=myservlet enctype="multipart/form-data">
<input name=description type=text>
<input name=myfile type=file>
<input name=submit type=submit>
</form>
I want myservlet to extract the name, description, mimetype, etc.
of the file for storage in a database. And then I want to extract
the contents of the file and store it on the server in its original
form (e.g. not mime encoded).
I tried the usual getParameter... methods and they return nothing.
I'm guessing since the data is not arriving in the usual
application/x-www-form-urlencoded form. Unfortunately, I don't
seem to be able to find analogous methods for multipart/form-data.
Please help.
Thanks,
John
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html