[Jersey] How to get matched path in jersey 1.0

From: Magesh STM <>
Date: Wed, 13 Aug 2014 22:38:37 -0700

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}" ?

    public class SayHello {

        public String sayPlainTextHello(@PathParam("name") String fromName) {
            return "Hello Jersey - " + fromName;