You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eric Sandusky <es...@configureone.com> on 2003/10/08 17:14:28 UTC

how to config Tomcat 4.1.27 multiple instances using JavaService

I need some specific configuration info to setup Tomcat such that I have
multiple services (using JavaService), and each service runs only 1 webapp.
I have viewed many posts on this topic and tried many different things. I
have 3 webapps under Tomcat, call them A, B, C. 
Currently, all 3 webapps I run locally must start and stop using the same
service. In addition, my 3 webapps all dump the system.outs and system.errs
to the same file. Here is some setup info:
 
Windows XP Pro
IIS 5.1
Tomcat 4.1.27
using isapi_redirect.dll
 
I'd like to have 3 services for Tomcat. One would run webapp A, and send
system.outs and system.errs to folder A, the second would run webapp B, and
send system.outs and system.errs to folder B, etc.
 
Here is an exerpt from conf\server-timetrack.xml. I define one of my three
webapps, the context name Timetrack10, and send the access and tomcat logs
to a specified folder.
 
<Context path="/Timetrack10" docBase="Timetrack10" debug="0"
reloadable="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="C:\tomcat4\webapps\Timetrack10\logs"
prefix="timetrack_access_log." suffix=".txt" pattern="common"/>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="C:\tomcat4\webapps\Timetrack10\logs" prefix="timetrack_log."
suffix=".txt" timestamp="true"/>
</Context>
 
Here is a sample of the batch file I use to create the service. I am trying
to use separate server.xml files currently (note using server-timetrack.xml
above). When I run this service, it runs all of my webapps, even though it
points to server-timetrack.xml, and that file only contains the Timetrack10
context.
 
JavaService.exe -install Timetrack c:\jdk14\jre\bin\client\jvm.dll -Xmx256m
-Xms100m -Xss64k
-Djava.class.path=c:\tomcat4\bin\bootstrap.jar;c:\tomcat4\common\lib\servlet
.jar;c:\jdk14\lib\tools.jar
-Dcatalina.home=c:\tomcat4 -start org.apache.catalina.startup.Bootstrap
-params -config "c:\tomcat4\conf\server-timetrack.xml" start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
c:\tomcat4\webapps\timetrack10\logs\stdout.txt -err
c:\tomcat4\webapps\timetrack10\logs\stderr.txt
 
What am I doing wrong? How can I make 3 services to run the 3 webapps?  I
need to know what goes in the server.xml, and what goes into the creation of
the service, and if there are any other configuration items that I am
missing.
 
Eric