users@jersey.java.net

Re: [Jersey] Getting multivalued parameter from GET querystring (like getParametersValues in servlet API)

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 27 Aug 2008 15:01:45 +0200

Eduardo Pérez Ureta wrote:
> Hi,
>
> I am starting to use this API to develop WEB applications accessing
> REST resources using XMLHttpRequest with JSON
> But I do not know how to get a multivalued parameter from the GET
> querystring (like getParametersValues() in servlet API)
>

   // path?mv=one&mv=two
   @GET
   public String get(@QueryParam("mv") List<String> mv) {
   }

   @GET
   public String get(@Context UriParam ui) {
     List<String> mv = ui.getQueryParameters().get("mv");
   }

Paul.

> Do you guys know how to do this or know any example that does this?
>
> Eduardo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109