tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Bánffy <>
Subject RE: Multiple homes
Date Wed, 31 May 2000 15:22:11 GMT
Hi All

I have a simple solution for this under NT with Tomcat running as a service.

All you have to do is to copy the file to, say, (I named the new files according to port numbers)
and let it point to "other_server.xml" where you specify the other port
number, work directory (see below) and document root. Then all you have to
do is to set up the service with this other file.

Building on that, I imagine that it's possible to start Tomcat via the
scrips provided in the bin directory with a different server.xml file.

The downside is that I have two instances of Tomcat running, which was
precisely what I intended to avoid.

A minor annoyance is that it insists in creating folders with "8080" in the
name under the work directory. I suppose (but haven't trashed a Tomcat
server trying this) that it would create some very nasty side-effects when
you forget to set a new work directory and have contexts named equaly on
your different applications.

You can't always win...

Please, tomcat dev list, find a way to have more than one server tag on
server.xml... If not now, maybe on Catalina.

-----Original Message-----
From: Ricardo Bánffy []
Sent: Wednesday, May 24, 2000 11:53 AM
Subject: RE: Multiple homes

BTW, I just tried (I think I have tried that before, but this time I can
show more info) adding another context manager.

When I tried to add the context manager (listed below)

    <ContextManager debug="1" workDir="my_other_root_work" >
        <!-- ContextInterceptor
className="org.apache.tomcat.context.LogEvents" / -->
        <ContextInterceptor className="org.apache.tomcat.context.AutoSetup"
className="org.apache.tomcat.context.DefaultCMSetter" />
className="org.apache.tomcat.context.WorkDirInterceptor" />
className="org.apache.tomcat.context.WebXmlReader" />
className="org.apache.tomcat.context.LoadOnStartupInterceptor" />
        <!-- Request processing -->
className="org.apache.tomcat.request.SimpleMapper" debug="0" />
className="org.apache.tomcat.request.SessionInterceptor" />
className="org.apache.tomcat.request.SecurityCheck" />
        <RequestInterceptor className="org.apache.tomcat.request.FixHeaders"

        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler"
            <Parameter name="port" value="8091"/>

        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler"
            <Parameter name="port" value="8009"/>

        <!-- example - how to override AutoSetup actions -->
        <Context path="/" docBase="webapps/my_other_root" debug="0"
reloadable="true" >

to the single server, I got this (ugly) trace

Starting tomcat in new window
Using classpath:
Context log: path="/examples" Adding context path="/examples"
Context log: path="" Adding context path=""  docBase="webapps/ROOT"
Context log: path="/test" Adding context path="/test"
Setting level to 1
set work dir my_other_root_work
Add contextInterceptor javaClass="org.apache.tomcat.context.AutoSetup"
Add contextInterceptor javaClass="org.apache.tomcat.context.DefaultCMSetter"
Add contextInterceptor

Add contextInterceptor javaClass="org.apache.tomcat.context.WebXmlReader"
Add contextInterceptor
Add requestInterceptor javaClass="org.apache.tomcat.request.SimpleMapper"
Add requestInterceptor

Add requestInterceptor javaClass="org.apache.tomcat.request.SecurityCheck"
Add requestInterceptor javaClass="org.apache.tomcat.request.FixHeaders"
Add connector javaClass="org.apache.tomcat.service.SimpleTcpConnector"
Add connector javaClass="org.apache.tomcat.service.SimpleTcpConnector"
Warning: replacing context for
Removing context path=""
ERROR reading ..\conf\server.xml
At Line 99 /Server/ContextManager/Context/

FATAL: configuration error
java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.tomcat.util.xml.AddChild.end(
        at org.apache.tomcat.util.xml.XmlMapper.matchEnd(
        at com.sun.xml.parser.Parser.maybeElement(
        at com.sun.xml.parser.Parser.content(
        at com.sun.xml.parser.Parser.maybeElement(
        at com.sun.xml.parser.Parser.content(
        at com.sun.xml.parser.Parser.maybeElement(
        at com.sun.xml.parser.Parser.parseInternal(
        at com.sun.xml.parser.Parser.parse(
        at org.apache.tomcat.util.xml.XmlMapper.readXml(
        at org.apache.tomcat.startup.Tomcat.execute(
        at org.apache.tomcat.startup.Tomcat.main(

Help, anyone?

-----Original Message-----
From: kc.baltz []
Sent: Wednesday, May 24, 2000 9:35 AM
To: ''
Subject: RE: Multiple homes

*sheepish* yes I did copy the entire tree.  It seemed like the easiest thing
to do and disk space isn't a problem.  I'm sure this wasn't necessary
though.  I'm sure you could symlink all but the conf directory.


To unsubscribe, email:
For additional commmands, email:

View raw message