code: public String getPathWithinApplication(HttpServletRequest request) {
          String requestUri = request.getRequestURI();
          if (requestUri == null) 
          	requestUri = "";
          String decodedRequestUri = decodeRequestString(request, requestUri);
          String contextPath = "";//getContextPath(request);
          String path;
          if (StringUtils.startsWithIgnoreCase(decodedRequestUri, contextPath) && !conf.isUseContext()) {
              // Normal case: URI contains context path.
              path = decodedRequestUri.substring(contextPath.length());
  
          } else if (!StringUtils.startsWithIgnoreCase(decodedRequestUri, contextPath) && conf.isUseContext()) {
              // add the context path on
              path = contextPath + decodedRequestUri;
  
          } else {
              path = decodedRequestUri;
          }
          return StringUtils.isBlank(path) ? "/" : path;
      }
docs: Return the path within the web application for the given request.
  <p>Detects include request URL if called within a RequestDispatcher include.