protected void deleteDirectory(File webAppFile){
  if (webAppFile.isDirectory()) {
    File[] children=webAppFile.listFiles();
    for (    File element : children) {
      deleteDirectory(element);
    }
    webAppFile.delete();
  }
 else {
    webAppFile.delete();
  }
}

protected void deleteDirectory ( File webAppFile ) { if ( webAppFile . isDirectory ( ) ) { File [ ] children = webAppFile . listFiles ( ) ; for ( File element : children ) { deleteDirectory ( element ) ; } webAppFile . delete ( ) ; } else { webAppFile . delete ( ) ; } }
recursively delete the webapp directory .
