Accept comma separated value in REST Webservice
I am trying to receive a list of String as comma separated value in the REST URI ( sample : http://localhost:8080/com.vogella.jersey.first/rest/todo/test/1/abc,test , where abc and test are the comma separated values passed in). Currently I am getting this value as string and then splitting it to get the individual values. Current code : @Path("/todo") public class TodoResource { // This method is called if XMLis request @GET @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Path("/test/{id: .*}/{name: .*}") public Todo getXML(@PathParam("id") String id, @PathParam("name")