users@jersey.java.net

Question about methods with parameters from _at_UriParam and _at_ConsumeMime

From: Dong Liu <edongliu_at_gmail.com>
Date: Wed, 30 Jan 2008 23:55:09 -0600

Hi,

Is it possible to have a method that has two parameters like the following?

    @Path("{user}/")
> @PUT
> @ConsumeMime("application/json")
> public Response updateAddress(@UriParam("user") String user,
> JSONObject address) throws JSONException{
> ...
> }
>

I tried, but it did not work. It seems that the JSONObject from request is
not passed. Is there any other way to do this besides creating a new
resource/class for @Path("{user}/")?

Thanks,

Dong

-- 
Dong Liu
http://blogs.usask.ca/dong_notes/