----- Original Message ----
> From: Pid <p...@pidster.com>
> To: Tomcat Users List <users@tomcat.apache.org>
> Sent: Saturday, August 22, 2009 4:04:32 AM
> Subject: Re: [OT] multipart/form-data solutions
> 
> On 22/08/2009 06:11, Tommy Pham wrote:
> >
> > Hi,
> >
> > I need some to process some multipart/form-data.  Are the any other 
> > solutions 
> other
> > than:
> 
> What are you really trying to achieve?  Are you uploading a file, or 
> doing something else?
> 

Hi Pid,

Thanks for the reply.  I want to process a multipart/form-data form submitted 
from the client via POST method.  The form may also or may not have a file 
upload.  I thought if there are any other solutions/methods than what I've 
found so far.

> > Solution A:
> >
> > 1. download http://www.servlets.com/cos/index.html
> > 2. invoke getParameters() on com.oreilly.servlet.MultipartRequest
> >
> > Solution B:
> >
> > 1. download http://jakarta.apache.org/commons/sandbox/fileupload/
> > 2. invoke readHeaders() in
> > org.apache.commons.fileupload.MultipartStream
> 
> I don't know about the other examples, but the above looks like an out 
> of date reference.  http://commons.apache.org/fileupload/ is the current 
> version.
> 
> Without knowing what you're really trying to achieve, it's hard to say, 
> but "readHeaders()" doesn't seem like the right method to call.
> 
> p
> 

Yes, silly me for just copying and pasting without checking first :)  I also 
tried MultipartStream.readHeaders() method found on the web but the coding 
wasn't elegant (perhaps it was based on the older version of FileUpload since 
the guide is a few years old).  After going through the sample guides on 
Apache's FileUpload site and
going through every class in the JavaDoc, I found the solution to my
problem. The streaming API guide on the home site is very nice and easy to 
implement using ServletFileUpload.parseRequest().

Thanks,
Tommy

> 
> > Solution C:
> >
> > 1. download http://users.boone.net/wbrameld/multipartformdata/
> > 2. invoke getParameter on
> > com.bigfoot.bugar.servlet.http.MultipartFormData
> >
> > Solution D:
> >
> > frameworks like struts, jsf, etc..
> >
> >
> > TIA,
> > Tommy
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to