Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
how to config Tomcat 4.1.27 multiple instances using JavaService

how to config Tomcat 4.1.27 multiple instances using JavaService

2003-10-08       - By Eric Sandusky

 Back
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 Source code of 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 Source code of org.apache.catalina.startup.Bootstrap
-params -config "c:\tomcat4\conf\server-timetrack.xml" start -stop
org.apache.catalina.startup.Bootstrap Source code of 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


©2008 junlu.com - Jax Systems, LLC, U.S.A.