tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Iannis Hanen" <Iannis.Ha...@bluejungle.com>
Subject <Environment> in Tomcat 5.0.28 not working with multiple tomcat services in server.xml
Date Fri, 20 May 2005 00:11:42 GMT
Hi,

 

I am back with some more questions. I have configured Tomcat to operate
with multiple services and engines (I have different services since I
need separate connector for different set of web applications). For some
web applications inside the host, I have specified some environment
entries. In the first service, everything works great. But in the second
service, I cannot access any of them. Is it a problem in Tomcat, or a
misconfiguration? Here is an outline of my server.xml file below.
Basically, "AttrName2" in the "foo2" context cannot be found. If I swap
the order of the services in server.xml, only the first service (on the
top) behaves properly.

 

Thanks,

Iannis

 

 

<Server ...>

  <Listener .../>

  <Listener .../>

 

<Service name="Service1">

 

    <Connector ... />

 

    <Engine name="Engine1" defaultHost="localhost" ...>

 

       <Logger .../>

 

      <Host name="localhost" ...>

 

      <DefaultContext>                        

             <Environment name="DefaultAttrName" type="java.lang.String"
value="Some default value"/>

     </DefaultContext>

                        

        <Context path="/foo" reloadable="false" docBase="C:\foo.war"
workDir="C:\ tomcat\work\foo">

            <Environment name="AttrName" type="java.lang.String"
value="myValueOK"/>

        </Context> 

      </Host>

    </Engine>

  </Service>

 

  <Service name="Service2">

    <Connector  .../>

 

    <Engine name="Engine2" defaultHost="localhost" ...>

 

       <Logger .../>

 

      <Host name="localhost" ...>

        <Context path="/foo2" reloadable="false" docBase="C:\foo2.war"
workDir="C:\ tomcat\work\foo2">

            <Environment name="AttrName2" type="java.lang.String"
value="MyLostValue"/>

        </Context> 

      </Host>

    </Engine>

  </Service>

</Server>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message