I want to pass multiple parameters into my method. How do I do this? I want the url to look like this http://host/one/two/three/four
I have the below code so far
@GET
@Produces({MediaType.APPLICATION_JSON})
@Path("/{one,two,three}")
public List<Person> getPeople(@PathParam ("one") String one, @PathParam ("two") String two, @PathParam ("three") String three){
String one = one;
String two = two;
String three = three;
}
Is this the right syntax for grabbing the params and passing it to my method? I've seen some regular expressions used in the @Path but I don't understand it. I honestly really just want to be able to grab the parameters and put them in a variable if possible.