users@jersey.java.net

Re: Where to read POST parameter

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Thu, 24 Apr 2008 08:40:37 -0400

Your method needs to have a parameter of type MultivaluedMap<String,
String> (no annotations required), like this:

@POST
SomeType someMethod(MultivaluedMap<String, String> formData, ...) {
   List<String> paramValues = formData.get("paramName");
   ...
}

Marc.


On Apr 24, 2008, at 5:55 AM, Leif Gensert wrote:

> This questions seems rather stupid, but I don't know how to get the
> POST-parameters of a request. The GET-query-paramers are easy to get
> by the URIInfo object.
>
> Can anybody help me? Can I get these Parameters as easy as I can get
> the parameters of the uri? (@Context URIInfo .....)
>
> Thanks
> Leif

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.