public static final String removeQueryString(final String path){
  return path.replaceFirst("\\?.*",StringUtils.EMPTY);
}

public static final String removeQueryString ( final String path ) { return path . replaceFirst ( "\\?.*" , StringUtils . EMPTY ) ; }
removes the query string from the provided path ( everything followed by ' ? ' including the question mark ) .
