users@jersey.java.net

[Jersey] Re: On Jersey consuming all FormParam's

From: Mark Petrovic <mspetrovic_at_gmail.com>
Date: Sun, 20 Feb 2011 10:58:17 -0800

I think this is expected behavior, based on

http://jersey.576304.n2.nabble.com/FormParam-Context-HttpContext-and-Context-HttpServletRequest-td4823857.html

On Sun, Feb 20, 2011 at 9:42 AM, Mark Petrovic <mspetrovic_at_gmail.com> wrote:

> I have this resource method
>
> public Response resMethod(@DefaultValue("") @FormParam("memo") String memo,
> @Context Thingy parties) {}
>
> where Thingy is built from a custom Provider.
>
> Ideally, I would like to have Jersey pluck out the "memo" form param, and
> let the Thingy provider pluck out and process the remainder of the form
> params.
>
> What I found, however, is that no matter how many form parameters I post,
> as long as there is one @FormParam in the method signature, Jersey leaves
> no
> form params remaining for consumption by the Thingy provider (via the Thing
> provider dipping into Form formParameters =
> httpContext.getRequest().getFormParameters()).
>
> Is this the behavior one would expect?
>
> --
> Mark
>



-- 
Mark