@echo off
REM
REM Copyright (C) 2001, Cisco Systems, Inc.
REM All rights reserved. 
REM
REM Simply enhanced autostart -- now waits for Tomcat
REM works only with win32 (since it uses the start command:-)
REM
REM Author: Lothar W. Groth (lgroth@cisco.com)
REM

start /MIN \startWebServer.bat

REM
REM simple loop to wait until Tomcat is ready to serve
REM

set TOMCAT_HOME=\tomcat

:oncemore

call \tomcat\bin\tomcat.bat ant -f /check-server.xml kiss | find "FAIL">NUL
if not errorlevel 1 goto tryagain
goto isready

:tryagain
echo -
echo INFO: WebServer not ready or not fully initialized -- testing again...
echo -
goto oncemore

:isready
echo -
echo INFO: WebServer is ready. Starting install page...
echo -
REM
REM Tomcat is ready -- and loop was ending :-)
REM Now start the whisk/jini install page
REM
REM start http://localhost:9851/install/index.html
start \index.html
