You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Iannis Hanen <Ia...@bluejungle.com> on 2005/05/20 02:11:42 UTC

in Tomcat 5.0.28 not working with multiple tomcat services in server.xml

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>


Re: in Tomcat 5.0.28 not working with multiple tomcat services in server.xml

Posted by Parsons Technical Services <pa...@earthlink.net>.
You did specify a different IP for each connector? Else the 2nd one will 
fail because the port is in use. Unless the ports on all connectors are 
different.

Doug


----- Original Message ----- 
From: "Iannis Hanen" <Ia...@bluejungle.com>
To: <to...@jakarta.apache.org>
Cc: <ih...@ubermon1.dubious.com>
Sent: Thursday, May 19, 2005 8:11 PM
Subject: <Environment> in Tomcat 5.0.28 not working with multiple tomcat 
services in server.xml


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>




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org