private String removeParameters(String targetUri){
  int parameterIndex=targetUri.lastIndexOf('?');
  if (parameterIndex != NO_PARAMETER_FOUND) {
    return targetUri.substring(START_INDEX,parameterIndex);
  }
  return targetUri;
}

private String removeParameters ( String targetUri ) { int parameterIndex = targetUri . lastIndexOf ( '?' ) ; if ( parameterIndex != NO_PARAMETER_FOUND ) { return targetUri . substring ( START_INDEX , parameterIndex ) ; } return targetUri ; }
removes all parameters from the targeturi .
