Xizhen Wang wrote:
>
> Hi! In file upload in servlet, we need to use
> ENCTYPE="multipart/form-data" in form in HTML file, like
> <form action="/servlet/upload" method="post"
> ENCTYPE="multipart/form-data">.
>
> my question is: can I transport other parameters in the form using
> getParameter()? I found I cannot do that if
> ENCTYPE="multipart/form-data". The return value of getParameter() is
> "null".
>
> can anyone help? How to do file-upload and transport parameters at the
> same time?
You need a special handler for multipart/form-data. I wrote one as
part of the Java Servlet Programming book. The code's at
http://www.servlets.com in com.oreilly.servlet.MultipartRequest.
Full docs are in the book. Good luck.
-jh-
--
Jason Hunter
[EMAIL PROTECTED]
Book: http://www.servlets.com/book
Article: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.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