I\'m making a simple, very lightweight front-controller. I need to match request paths to different handlers (actions) in order to choose the correct one.
On my loca
Consider the following servlet conf:
NewServlet
NewServlet
NewServlet
/NewServlet/*
Now, when I hit the URL http://localhost:8084/JSPTemp1/NewServlet/jhi, it will invoke NewServlet as it is mapped with the pattern described above.
Here:
getRequestURI() = /JSPTemp1/NewServlet/jhi
getPathInfo() = /jhi
We have those ones:
getPathInfo()
returns
a String, decoded by the web container, specifying extra path information that comes after the servlet path but before the query string in the request URL; or null if the URL does not have any extra path information
getRequestURI()
returns
a String containing the part of the URL from the protocol name up to the query string