dev@jsr311.java.net

Re: JSR311: POSTed form data

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 14 Feb 2008 17:08:14 -0500

+1 in favor of it.

A side affect is that I was going to have an annotation like this for
the client-side framework I'm working on.

Marc Hadley wrote:
> Issue 30[1] requests that we improve support for POSTed form data,
> either by supporting it with the existing @QueryParam annotation or by
> adding a new annotation, e.g. @PostParam or @FormParam.
>
> Note that we already require support for
>
> @POST @ConsumeMime("application/x-www-form-urlencoded")
> public Foo update(MultivaluedMap<String,String> formData) {
> String name = formData.get("name");
> ...
> }
>
> where formData can be used to get at the individial form fields.
>
> The suggested addition would add support for doing something like:
>
> @POST @ConsumeMime("application/x-www-form-urlencoded")
> public Foo update(@QueryParam("name") String name) {...}
>
> Opinions ?
>
> If you are in favor, do you think this warrants a new annotations or a
> change to the existing @QueryParam.
>
> If you favor a change to @QueryParam then which should take precedence
> if the same name is used for a field in the request entity and a URI
> query param ?
>
> Thanks,
> Marc.
>
> [1] https://jsr311.dev.java.net/issues/show_bug.cgi?id=30
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com