tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milt Epstein <>
Subject Re: how to define duplicate context in Tomcat (server.xml)
Date Thu, 26 Feb 2004 15:57:33 GMT
On Thu, 26 Feb 2004, Rina Shilo wrote:

> I want to duplicate my service that run under tomcat so I'll have it
> twice on my web server under 2 different names.  (since I need 1
> service running, and the second to be a test service).  My tomcat
> service include JS, JSP, Classes.
> How to configure the tomcat to start both services?
> I tried already to define it as new context in the same service in
> the server.xml - and it's not worked.
> I tried already to define it as new context in a new service tag in
> the server.xml - and it's not worked.
> Just one of them work, the second failed. seems to me its because
> they include similar classes file/name.

In theory, I believe, you should be able to get either one to work.
But maybe you have some of the details wrong.  Without more info, like
what config you tried, and what error(s) you got, it's hard to tell
what's wrong.

Also note that depending on what version of Tomcat you are using,
placing Context tags directly in server.xml may not be the proper way
to do it.  Other options include just placing the subdirectories under
webapps so they will get picked up automatically, or placing context
configuration files (which include only the Context tag) in the
appropriate location under <tomcat>/conf (i.e.,

> this is how it look like:
>  <Host name="Service" debug="0" appBase=""
>   unpackWARs="true" autoDeploy="true">
>         <Valve className="org.apache.catalina.valves.AccessLogValve"
>                  directory="c:/Program Files/Logs"  prefix="tomcat_access."
> suffix=".log"
>                  pattern="common" resolveHosts="false"/>
>  <Context path="/A" docBase="c:\Program Files\A" crossContext="false"
> debug="0" reloadable="false" />
>  <Context path="/B" docBase="c:\Program Files\B" crossContext="false"
> debug="0" reloadable="false" />
>         </Host>
> can someone help me in this?
> ===========================

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message