code: public static final String getRequestUriWithoutContextPath(HttpServletRequest request) {
          String uri = request.getRequestURI().substring(request.getContextPath().length());
          if (!uri.isEmpty()) {
              return uri;
          } else {
              return "/";
          }
      }
docs: Returns the request URI without the context path.
  
  @param request   the request where to get the URI from