code: private static String getHandler(HttpServletRequest request) {
      String pathInfo = request.getPathInfo();
      return pathInfo == null ? "" : pathInfo.substring(1);
    }
docs: Returns the handler portion of the URL path.
  
  For examples (for a servlet mapped as /foo/*):
  getHandler(https://www.google.com/foo/bar) -> bar
  getHandler(https://www.google.com/foo/bar/id) -> bar/id