This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Page tree
Skip to end of metadata
Go to start of metadata

This script should do it

rem #############################################################################################################
rem #ENVIRONMENT
set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_01
set CATALINA_HOME=C:\Tomcat5.5
set CATALINA_BASE=C:\tomcat_new1
set SERVICE_NAME=tomcat_new1
mkdir %CATALINA_BASE%
mkdir %CATALINA_BASE%\logs
mkdir %CATALINA_BASE%\conf
mkdir %CATALINA_BASE%\temp
mkdir %CATALINA_BASE%\work
rem #############################################################################################################
rem #PATHS
set PATH=%PATH%;%CATALINA_HOME%

set JCP=%CLASSPATH%;
set JCP=%JCP%;%JAVA_HOME%\lib\tools.jar
set JCP=%JCP%;%JAVA_HOME%\jre\lib\rt.jar

set JCP=%JCP%;%CATALINA_HOME%\bin\bootstrap.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\catalina-ant-jmx.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\catalina-ant.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\catalina-cluster.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\catalina-optional.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\catalina-storeconfig.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\catalina.jar

set JCP=%JCP%;%CATALINA_HOME%\server\lib\commons-modeler.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\servlets-cgi.renametojar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\servlets-default.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\servlets-invoker.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\servlets-ssi.renametojar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\servlets-webdav.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\tomcat-ajp.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\tomcat-apr.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\tomcat-coyote.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\tomcat-http.jar
set JCP=%JCP%;%CATALINA_HOME%\server\lib\tomcat-util.jar

set JCP=%JCP%;%CATALINA_HOME%\common\lib\commons-el.jar
set JCP=%JCP%;%CATALINA_HOME%\common\lib\jasper-compiler.jar
set JCP=%JCP%;%CATALINA_HOME%\common\lib\jasper-compiler-jdt.jar
set JCP=%JCP%;%CATALINA_HOME%\common\lib\jasper-runtime.jar
set JCP=%JCP%;%CATALINA_HOME%\common\lib\jsp-api.jar
set JCP=%JCP%;%CATALINA_HOME%\common\lib\naming-factory.jar
set JCP=%JCP%;%CATALINA_HOME%\common\lib\naming-factory-dbcp.jar
set JCP=%JCP%;%CATALINA_HOME%\common\lib\naming-resources.jar
set JCP=%JCP%;%CATALINA_HOME%\common\lib\servlet-api.jar

rem #############################################################################################################
rem #RUN
"%CATALINA_HOME%\bin\tomcat5.exe" //DS//%SERVICE_NAME% 
"%CATALINA_HOME%\bin\tomcat5.exe" //IS//%SERVICE_NAME% --JvmOptions=-Dcatalina.home="%CATALINA_HOME%";-Dcatalina.base="%CATALINA_BASE%";-Djava.util.logging.config.file="%CATALINA_BASE%"\conf\logging.properties;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.endorsed.dirs="%CATALINA_HOME%"\common\endorsed;-Djava.io.tmpdir="%CATALINA_BASE%"\temp --DisplayName="%SERVICE_NAME%" --StdOutput="%CATALINA_BASE%\logs\stdout.log" --StdError="%CATALINA_BASE%\logs\stderr.log" --Classpath="%JCP%" --StartClass=org.apache.catalina.startup.Bootstrap --LogPath="%CATALINA_BASE%\logs" --Install="%CATALINA_HOME%\bin\tomcat5.exe" --Jvm=auto --StartMode=jvm --StopMode=jvm --StartParams=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop

For full documentation on the //DS //IS and other commandline parameters, see http://commons.apache.org/daemon/procrun.html

  • No labels