Commons FileUpload also handles multipart posts.

Mike

Eric Johnson wrote:
I missed that the problem lies with the server the first time I read this post as well. Tomcat does not support multipart/form-data requests, in the sense that it will not parse and extract the parameters for you (and there are good reasons for this, as it doesn't fit nicely in the servlet API - at least not yet - I've not looked at upcoming changes to the API). You can of course write code to do this if you want to, or you can use the simpler PostMethod class.

If you need the multipart/form-data POST support, you might look for Jason Hunter's servlet utilities package (cos.jar, I think). Does anyone know of other Java packages that handle multipart/form-data request parsing on the server?

-Eric.

Kalnichevski, Oleg wrote:

Dave, Daniel
I am sorry if my previous statement turned out to be confusing or unclear. I do think that PostMethod may be more appropriate in your case. MultipartPostMethod usually comes handy when you need to submit binary data along with some parameters with a single HTTP request. In most cases, however simple HTTP POST (represented by PostMethod class) should suffice.
I suspect that the problem in your case lies with the server rather than with the client (I have no concrete evidence of that, though. It's just a guess on my part) What servlet engine are you using? If you are using Tomcat, what version? Are you sure it supports 'multipart/form-data' content type?

Oleg



--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to