Reputation: 21978
With following resource class,
@Path("/cities")
public class CitiesResource {
public Response read(
@PathParam("???") final PathSegment path) {
// ...
}
}
How can I get a PathSegment
for the root @Path("/cities")
?
Upvotes: 1
Views: 39
Reputation: 208984
You could get all the PathSegment
s from UriInfo.getPathSegments()
@GET
public String read(@Context UriInfo info) {
List<PathSegment> segments = info.getPathSegments();
}
Upvotes: 1