Hi @shivani_panchal39 ,
In your code you are converting the RequestPathInfo object to a string, that's why you are seeing that behavior here
String pathInfo= String.valueOf(request.getRequestPathInfo());
Not sure what would you want to read from requestParhInfo, but you could use
requestPathInfo.setExtension("json");
requestPathInfo.setSuffix("temp");
requestPathInfo.setSelectorString("str1");
and in the Servlet, read the values from the reqPathInfo object
request.getRequestPathInfo().getExtension()
request.getRequestPathInfo().getSelectorString()
Regards,
Nitesh