SRV.5.4 Request Path ElementsThe request path that leads to a servlet servicing a request is composed of many important sections. The following elements are obtained from the request URI path and exposed via the request object:
The following methods exist in the HttpServletRequest interface to access this information:
It is important to note that, except for URL encoding differences between the request URI and the path parts , the following equation is always true: requestURI = contextPath + servletPath + pathInfo To give a few examples to clarify the above points, consider Table SRV.5-1. Table SRV.5-1. Example Context Setup
The behavior in Table SRV.5-2 is observed . Table SRV.5-2. Observed Path Element Behavior
|