Suppose I want to have path look like this /Servlet1?id=34/Servlet2
I want to access Servlet2 depending on the id parameter received in Servlet1, but when I try to do so system access service methods of Servlet1 only and do not go to Servlet2
I just want to skip the code for Servlet1 and move to Servlet2 when my path is /Servlet1?id=34/Servlet2 otherwise run code in Servlet 1 when path is /Servlet1?id=34
I am not sure when such approach is to be used, where you access a Servlet which is like a descendent to another servlet. If I am taking any concept wrong kindly correct or else suggest some solution to make it work
EDIT: If user enters /Servlet1?id=34 then it shows an entirely different page and when user enters /Servlet1?id=34/Servlet2 I want to show a different page based on the id specified in Servlet1.
Problem is that the URI that I get in Servlet1 when user enter path /Servlet1?id=34/Servlet2 is only /Servlet1 i.e. Servlet2 is nowhere in URI so how do I identify which Servlet user is looking for?