users@jersey.java.net

Re: [Jersey] File upload multipart/form-data issue with Struts2-Spring

From: coldserenity <muntyanu.roman_at_gmail.com>
Date: Mon, 9 Feb 2009 08:57:13 -0800 (PST)

coldserenity wrote:
>
> I'm using jersey-multipart-1.0.2-SNAPSHOT. Application is running on
> jboss-4.2.2.GA, struts2, spring
>
> I've tried this example out of our Struts2-Spring environment and
> everything worked fine.
> Does anyone have an idea what could be the reason for this?
>

It looks like the problem with Struts out-of-the-box behavior

fileupload-faq wrote:
>
> Struts recognises multipart requests, and parses them automatically,
> presenting the request parameters to your code in the same manner as if
> they were regular request parameters. Since Struts has already processed
> the request, and made it available in your form bean, the input stream is
> no longer available for parsing, so attempting to do so with FileUpload
> will fail.
> (from here:
> http://commons.apache.org/fileupload/faq.html#parse-in-action-fails
> http://commons.apache.org/fileupload/faq.html#parse-in-action-fails )

Currently looking for a way to exclude a certain path from Struts filter
processing (which is also a tricky task). If someone had similar
"challenges" configuring Jersey, ideas are appreciated.
-- 
View this message in context: http://n2.nabble.com/File-upload-multipart-form-data-issue-with-Struts2-Spring-tp2297875p2298250.html
Sent from the Jersey mailing list archive at Nabble.com.