users@jersey.java.net

Re: [Jersey] Problems with Jersey and Multipart

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 03 Dec 2009 16:16:32 +0100

On Dec 3, 2009, at 4:10 PM, Á. Eduardo García wrote:

>
> My version of Jersey is 1.1.4.1 and Glassfish b73.
>
> Right now I cannot create a test case, maybe in a few hours
> (although my
> HTML and java code couldn't be simpler, I'm using a plain form with
> one
> 'file' field and a class with a @Path and the @POST method I added
> earlier).
>

OK. If you can send me (privately if you like) your HTML that would
help me and i can easily create the server side.


> Using FormDataMultiPart doesn't show any change. Using another
> browser also
> doesn't help. However, using @FormParam instead of @FormDataParam in
> all
> parameters, throws this on Glassfish log:
>
> SEVERE: The RuntimeException could not be mapped to a response, re-
> throwing
> to the HTTP container
> com.sun.jersey.api.container.ContainerException:
> javax.mail.MessagingException: Missing start boundary
> at
> com
> .sun
> .jersey
> .server
> .impl
> .model
> .method
> .dispatch
> .MultipartFormDispatchProvider
> .processForm(MultipartFormDispatchProvider.java:91).
> ...
>
> Tell me if that helps.
>

So when you do that you are using the deprecated multipart/form-data
support. It seems to indicate an error in the information the client
sends to the server.

And what if you change your method signature to:

   onPost(FormDataMultiPart fdmp) { .... }

?

Paul.