public void buildPathPartWithContextRoot(Appendable buffer,String url) throws WebAppConfigurationException, IOException {
  if (contextPath == null) {
    throw new IllegalStateException("Context path is unknown");
  }
  buffer.append(contextPath);
  if (!contextPath.endsWith("/") && !url.startsWith("/")) {
    buffer.append("/");
  }
  buffer.append(url);
}

public void buildPathPartWithContextRoot ( Appendable buffer , String url ) throws WebAppConfigurationException , IOException { if ( contextPath == null ) { throw new IllegalStateException ( "Context path is unknown" ) ; } buffer . append ( contextPath ) ; if ( ! contextPath . endsWith ( "/" ) && ! url . startsWith ( "/" ) ) { buffer . append ( "/" ) ; } buffer . append ( url ) ; }
scipio : builds a partial url - including the context path , but not the scheme or host or servlet .
