@echo off
REM
REM Copyright 2003 Sun Microsystems, Inc. All rights reserved.
REM SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
REM
REM
REM @(#)run.bat 1.1 03/10/17
REM
rem Should have the following variables set:
rem
set JAVA_HOME=c:\j2sdk1.4.1
set TOMCAT_HOME=c:\jwsdp-1.3
set PATH=%TOMCAT_HOME%/bin;%TOMCAT_HOME%/jaxrpc/bin;%JAVA_HOME%/bin;%PATH%
rem check variables correctness
if ""%TOMCAT_HOME%""=="""" goto no_tomcat
if not exist %TOMCAT_HOME%\jaxrpc\bin\wscompile.bat goto no_tomcat2
if ""%JAVA_HOME%""=="""" goto no_java
if not exist %JAVA_HOME%/bin/javac.exe goto no_java2
if not exist serverscript.war goto build
echo Coping serverscript.war to webapps
copy serverscript.war %TOMCAT_HOME%\webapps
echo Stopping Tomcat
call %TOMCAT_HOME%/bin/catalina.bat stop
echo Starting Tomcat
call %TOMCAT_HOME%/bin/catalina.bat start
goto exit
:build
echo You should run build.bat before
goto exit
:no_tomcat
echo TOMCAT_HOME variable is not set
:no_tomcat2
echo TOMCAT_HOME should point to JWSDP-1.2 installation
echo You can download it from:
echo http://java.sun.com/webservices/downloads/webservicespack.html
goto error
:no_java
echo JAVA_HOME variable is not set
:no_java2
echo JAVA_HOME should point to J2SDK installation
:error
:exit
pause