I have this following question. Please help.
Please refer following code. /hello/from/JohnDoe will hit the method sayPlainTextHello.
When "/hello/from/JohnDoe" is accessed, I want to store the matched path which is /hello/from/{name} in a log. Please note that I can't modify below code but can add filter, etc. to the app. How to get the matched path "/hello/from/{name}" ?
@Path("hello")
public class SayHello {
@GET
@Produces(MediaType.TEXT_PLAIN)
@Path("/from/{name}")
public String sayPlainTextHello(@PathParam("name") String fromName) {
return "Hello Jersey - " + fromName;
}
}