|
Does anybody have any Java examples of processing an HTML form
that includes a FILE as input? My limited understanding is that the FORM
ENCTYPE="multipart/form-data" needs to be set, but I'm unsure how to get at the
file from my JSP/Servlet.
I have a simple sample upload for a file, and I can easily get
the form elements by name using the request.getParameterValues() method, but if
you use that on the file element, you get the name of the file as it was called
on the client's computer. It doesn't have the file's contents.
Then, I tried looking at the content-length, but it was small
(only 87 bytes in my case), so I know it is not showing the contents of the file
either. I suspect it has to do with the multi-part MIME file, and perhaps
the servlet is only capable of handing a single-part form.
How do I get at the FILE's contents that should have been
uploaded?
Thanks,
David
---------------------------------------------
David A. E. Wall myEastside.com 218 Main Street PMB 550 Kirkland, WA 98033 USA Tel 425.822.4465 [EMAIL PROTECTED] Fax 425.822.4465 http://myEastside.com |
- Re: Uploading file to jsp/ser... David Wall
- Re: Uploading file to js... Love Java
- Re: Uploading file t... Jason Hunter
- Re: Uploading file to js... Magnus %ERR-PTR-NIL Pointer reference to NIL
- Re: Uploading file t... Daniel Lopez
- Re: Uploading file to js... C.K. Lim
- Re: Uploading file t... David Wall
- Re: Uploading file to js... Pascal Houde
