users@jersey.java.net

Re: [Jersey] _at_FormParam with FormDataContentDisposition

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 11 Nov 2008 19:08:36 +0100

On Nov 11, 2008, at 6:57 PM, Gili wrote:

>
> Paul,
>
> The JAX-RS specification is very confusing about what @FormParam
> actually
> does. In fact, it doesn't look like it defines it at all.

https://jsr311.dev.java.net/nonav/javadoc/javax/ws/rs/FormParam.html

I agree it is rather vague with respect to what is a "form parameter"
is.

My understanding that we specified it to work only for consuming
"application/x-www-form-urlencoded" representations.


> I ask because I am
> wondering what happens if I use the Jersey implementation today but
> decide
> to migrate to another implementation in the future. Can you comment
> on the
> portability of this feature?
>

If you use the feature when consuming "multupart/form-data"
representations then it is currently non standard.

Paul.


> Thank you,
> Gili
>
>
> Paul Sandoz wrote:
>>
>> Hi,
>>
>> I just committed support in the trunk that enables you to do the
>> following:
>>
>> @POST
>> @Consumes("multipart/form-data")
>> public String post(
>> @FormParam("file") JAXBBean f,
>> @FormParam("file") FormDataContentDisposition fdc)
>> throws Exception {
>> ..
>> }
>>
>> so it is possible to get parameters values like the value of the
>> "filename" parameter, if present.
>>
>> Paul.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>>
>
> --
> View this message in context: http://n2.nabble.com/%40FormParam-with-FormDataContentDisposition-tp1485168p1486170.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>