protected HttpURLConnection createUndeployConnection(WAR war) throws IOException {
  String undeployURL=this.deployerUrl + "/undeploy?path=/" + war.getContext();
  URL url=new URL(undeployURL);
  HttpURLConnection connection=(HttpURLConnection)url.openConnection();
  connection.setAllowUserInteraction(false);
  connection.setDoInput(true);
  connection.setDoOutput(true);
  connection.setUseCaches(false);
  connection.setDoOutput(false);
  connection.setRequestMethod("GET");
  if (this.username != null) {
    String authorization=toAuthorization(this.username,this.password);
    connection.setRequestProperty("Authorization",authorization);
  }
  connection.connect();
  return connection;
}

protected HttpURLConnection createUndeployConnection ( WAR war ) throws IOException { String undeployURL = this . deployerUrl + "/undeploy?path=/" + war . getContext ( ) ; URL url = new URL ( undeployURL ) ; HttpURLConnection connection = ( HttpURLConnection ) url . openConnection ( ) ; connection . setAllowUserInteraction ( false ) ; connection . setDoInput ( true ) ; connection . setDoOutput ( true ) ; connection . setUseCaches ( false ) ; connection . setDoOutput ( false ) ; connection . setRequestMethod ( "GET" ) ; if ( this . username != null ) { String authorization = toAuthorization ( this . username , this . password ) ; connection . setRequestProperty ( "Authorization" , authorization ) ; } connection . connect ( ) ; return connection ; }
creates an undeploy connection for the deployer .
