Hi Harold,
I have no practical experience with running Jersey on GAE.
But your code looks fine to me, and should work as expected.
Could you please try this out locally (outside GAE).
Does it work? Then the issue might be GAE related.
Another thing is how you generate the request.
Could you try to use curl --data "a=val1b&a=val2&b=val3" $yourUri
Does it work now? Then you might want to check the client.
~Jakub
On 06/03/2011 09:24 AM, harold.capitaine_at_gmail.com wrote:
> Hi all,
>
> First of all, I'm using Jersey 1.7 on GAE (Google Apps Engine).
> My goal is to get all parameters from a POST request as a parameter of
> a mapped method.
> I read the doc and it's writing to use this:
> @POST
> @Consumes("application/x-www-form-urlencoded")
> public void post(MultivaluedMap<String, String> formParams) {
> // Store the message
> }
>
> But in my case, the variable formParam is always an empty map.
> I also read that all values need to be Strings but mines are.
>
> So do I need to configure anything special for example in the web.xml
> or somewhere else to make it works.
>
> Thanks for your help.
>