private static boolean waitTillPageAlive(String url,int timeoutSecs) throws IOException {
  int tries=0;
  int secsBetweenTries=1;
  while (true) {
    boolean alive=isURLAlive(url);
    tries++;
    if (alive)     break;
    out.println("Web app not deployed after " + tries + " tries");
    try {
      Thread.sleep(secsBetweenTries * 1000);
    }
 catch (    InterruptedException ie) {
    }
    if (tries * secsBetweenTries > timeoutSecs) {
      out.println("\n\n\nSORRY! FAILED TO START CORRECTLY AFTER " + tries + " TRIES!\n\n\n");
      return false;
    }
  }
  out.println("The ePADD web application was deployed successfully (#tries: " + tries + ")");
  return true;
}

private static boolean waitTillPageAlive ( String url , int timeoutSecs ) throws IOException { int tries = 0 ; int secsBetweenTries = 1 ; while ( true ) { boolean alive = isURLAlive ( url ) ; tries ++ ; if ( alive ) break ; out . println ( "Web app not deployed after " + tries + " tries" ) ; try { Thread . sleep ( secsBetweenTries * 1000 ) ; } catch ( InterruptedException ie ) { } if ( tries * secsBetweenTries > timeoutSecs ) { out . println ( "\n\n\nSORRY! FAILED TO START CORRECTLY AFTER " + tries + " TRIES!\n\n\n" ) ; return false ; } } out . println ( "The ePADD web application was deployed successfully (#tries: " + tries + ")" ) ; return true ; }
waits till the page at the given url is alive , subject to timeout returns true if the page is alive . false if the page is not alive at the timeout
