cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: multi part mime requests
Date Tue, 07 Mar 2000 04:24:21 GMT
On Mon, 6 Mar 2000, K. Rumman Akhter wrote:

> i am trying to set up file uploads using
> <form ENCTYPE="multipart/form-data" method="POST" action="addfile.xml">
> and in addfile.xml, am using xsp's to break apart the httprequest object,
> but so far, my multipart request only have the headers but when i start
> reading the multipart boundaries, i start getting null, which means that the
> multi-parts are not getting sent. is the request object on xsp's a standard
> request object, or is the xsp processor striping down/adding to the request?

terribly unfortunately, most servlet engines cannot parse
multipart/form-data requests with their default HttpServletRequest impl.
oddly enough, code to do it manually is slightly hard to find on the 'net.
even more unfortunately, cocoon messes with the request object, so that
even if you found some code to do it for you, you're SOL since cocoon will
have already messed with the inputstream. moral of the story - if you want
to handle file uploads, do it in a standalone servlet or even easier, a
perl cgi, and use redirect to send user back to cocoon-land.

- donald

View raw message