code: @Nonnull
    public static String getPathWithinServlet (@Nonnull final HttpServletRequest aHttpRequest)
    {
      ValueEnforcer.notNull (aHttpRequest, "HttpRequest");
  
      final String sPathWithinApp = getPathWithinServletContext (aHttpRequest);
      final String sServletPath = ServletHelper.getRequestServletPath (aHttpRequest);
      if (sPathWithinApp.startsWith (sServletPath))
        return sPathWithinApp.substring (sServletPath.length ());
  
      // Special case: URI is different from servlet path.
      // Can happen e.g. with index page: URI="/", servletPath="/index.html"
      // Use servlet path in this case, as it indicates the actual target path.
      return sServletPath;
    }
docs: Return the path within the servlet mapping for the given request, i.e. the
  part of the request's URL beyond the part that called the servlet, or "" if
  the whole URL has been used to identify the servlet. <br>
  Detects include request URL if called within a RequestDispatcher include.
  <br>
  E.g.: servlet mapping = "/test/*"; request URI = "/test/a" -&gt; "/a". <br>
  E.g.: servlet mapping = "/test"; request URI = "/test" -&gt; "". <br>
  E.g.: servlet mapping = "/*.test"; request URI = "/a.test" -&gt; "".
  
  @param aHttpRequest
  current HTTP request
  @return the path within the servlet mapping, or ""