wro4j-core/src/main/java/ro/isdc/wro/util/WroUtil.java
public static String getPathInfoFromLocation(final HttpServletRequest request, final String location) {
    if (StringUtils.isEmpty(location)) {
      throw new IllegalArgumentException("Location cannot be empty string!");
    }
    final String contextPath = request.getContextPath();
    if (contextPath != null) {
      if (startsWithIgnoreCase(location, contextPath)) {
        return location.substring(contextPath.length());
      } else {
        return location;
      }
    }
    final String noSlash = location.substring(1);
    final int nextSlash = noSlash.indexOf('/');
    if (nextSlash == -1) {
      return "";
    }
    return noSlash.substring(nextSlash);
  }
public static String getPathInfoFromLocation(final HttpServletRequest request, final String location) {
    if (StringUtils.isEmpty(location)) {
      throw new IllegalArgumentException("Location cannot be empty string!");
    }
    final String contextPath = request.getContextPath();
    if (contextPath != null) {
      if (startsWithIgnoreCase(location, contextPath)) {
        return location.substring(contextPath.length());
      } else {
        return location;
      }
    }
    final String noSlash = location.substring(1);
    final int nextSlash = noSlash.indexOf('/');
    if (nextSlash == -1) {
      return "";
    }
    return noSlash.substring(nextSlash);
  }
public static String getPathInfoFromLocation ( final HttpServletRequest request , final String location ) { if ( StringUtils . isEmpty ( location ) ) { throw new IllegalArgumentException ( "Location cannot be empty string!" ) ; } final String contextPath = request . getContextPath ( ) ; if ( contextPath != null ) { if ( startsWithIgnoreCase ( location , contextPath ) ) { return location . substring ( contextPath . length ( ) ) ; } else { return location ; } } final String noSlash = location . substring ( 1 ) ; final int nextSlash = noSlash . indexOf ( ' ' ) ; if ( nextSlash == - 1 ) { return "" ; } return noSlash . substring ( nextSlash ) ; }
Retrieve pathInfo from a given location.

@param request
@param location
where to search contextPath.
@return pathInfo value.
Retrieve pathInfo from a given location .