users@jersey.java.net

[Jersey] _at_FormParam and URL-Decoding

From: Charx <charx_at_gmx.net>
Date: Wed, 30 Sep 2009 08:44:31 -0700 (PDT)

Hello,

i don't know why jersey (1.0.3) does not decode the FormParams in my code
automatically:

<code>
    @POST
    @Path("{spaceId}/release")
    @Consumes("application/x-www-form-urlencoded")
    public Response addUserToSpace(@PathParam("spaceId") final String
spaceId,
// @FormParam("friendEmails") final String emailList,
// @FormParam("emailSubject") final String emailSubject,
// @FormParam("emailBody") final String emailBody) {
                                                                    final MultivaluedMap<String, String> formParameters) { .... }
</code>

As you can see, i tried it with and without the @Consumes annotation, with
and without @FormParam annotation.

Now when the client is sending some encoded data, e.g. an email for the
emailList, then it will still appear encoded in my method body. But the spec
says on page 9, 3.3.2 Parameters: "The Encoded annotation may be used to
disable automatic URI decoding of parameter values", so i guess that
normally jersey should be in charge of decoding this parameter
automatically....

What am i missing here?

Thanks in advance..
            

-- 
View this message in context: http://n2.nabble.com/FormParam-and-URL-Decoding-tp3743474p3743474.html
Sent from the Jersey mailing list archive at Nabble.com.