code: public static String getURIForCurrentDispatch (HttpServletRequest req){
            String includeURI = (String) req.getAttribute(WebAppRequestDispatcher.REQUEST_URI_INCLUDE_ATTR);
            if (includeURI == null)
                   return req.getRequestURI();
            else 
                   return includeURI;
     }
docs: Used to retrive the "true" uri that represents the current request.
  If include request_uri attribute is set, it returns that value.
  Otherwise, it returns the default of req.getRequestUri
  @param req
  @return