Hi All,

This is the first time, i'm trying to configure Tomcat.
I'm currently using Tomcat 5.0.28 / Java 1.4.2.
I'have written my own server.xml regarding 
Tomcat Documentation at jakarta.apache.org.

this is what i have done : 

<Server className="org.apache.catalina.core.StandardServer"
port="8015" shutdown="SHUTDOWN">
        <Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
        <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>

        <Service name="Catalina">
                <Connector port="8080" maxThreads="150"
minSpareThreads="25" maxSpareThreads="75"
                        enableLookups="false" redirectPort="8443"
acceptCount="100" debug="0"
                        connectionTimeout="20000"
disableUploadTimeout="true"         compression="on"
                        compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
                        compressableMimeType="text/html,text/xml"/>

                <Engine name="StandAlone-Catalina"
backgroundProcessorDelay="-1" defaultHost="localhost" debug="0">
                        <Valve
className="org.apache.catalina.valves.AccessLogValve"
prefix="Catalina_access_log"
                                suffix=".txt" directory="logs" rotatable="true">
                        </Valve>

                        <Logger
className="org.apache.catalina.logger.FileLogger"
                                directory="logs"
prefix="Catalina_access_log" suffix=".txt" timestamp="true"/>

      <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" 
                 autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
       <Context className="org.apache.catalina.core.StandardContext"
path="/jsp-examples"/>
       <Context className="org.apache.catalina.core.StandardContext"
path="/servlets-examples"/>
       <Context className="org.apache.catalina.core.StandardContext"
path="/webdav"/>
       <Context className="org.apache.catalina.core.StandardContext"
path="/tomcat-docs"/>
       <Context className="org.apache.catalina.core.StandardContext"
path="/ROOT"/>
     </Host>
   </Engine> 
  </Service>
</Server>

This works fine and i can browse the Tomcat examples.

What i want to do now is to use the following server.xml file which
declare 2 Tomcat Servers :

<Server className="org.apache.catalina.core.StandardServer"
port="8015" shutdown="SHUTDOWN">
        <Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
        <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>

        <Service name="Catalina">
                <Connector port="8080" maxThreads="150"
minSpareThreads="25" maxSpareThreads="75"
                        enableLookups="false" redirectPort="8443"
acceptCount="100" debug="0"
                        connectionTimeout="20000"
disableUploadTimeout="true" compression="on"
                        compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
                        compressableMimeType="text/html,text/xml"/>

                <Engine name="StandAlone-Catalina"
backgroundProcessorDelay="-1" defaultHost="localhost" debug="0">
                        <Valve
className="org.apache.catalina.valves.AccessLogValve"
prefix="Catalina_access_log"
                                suffix=".txt" directory="logs" rotatable="true">
                        </Valve>

                        <Logger
className="org.apache.catalina.logger.FileLogger"
                                directory="logs"
prefix="Catalina_access_log" suffix=".txt" timestamp="true"/>

                        <Host name="localhost" debug="0"
appBase="webapps" unpackWARs="true"
                                autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
                                <Context
className="org.apache.catalina.core.StandardContext"
path="/jsp-examples"/>
                                <Context
className="org.apache.catalina.core.StandardContext"
path="/servlets-examples"/>
                                <Context
className="org.apache.catalina.core.StandardContext" path="/webdav"/>
                                <Context
className="org.apache.catalina.core.StandardContext"
path="/tomcat-docs"/>
                                <Context
className="org.apache.catalina.core.StandardContext" path="/ROOT"/>
                        </Host>
                </Engine> 
        </Service>
</Server>

<Server className="org.apache.catalina.core.StandardServer"
port="8016" shutdown="SHUTDOWN">
        <Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
        <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>

        <Service name="Angelina">
                <Connector port="8181" maxThreads="150"
minSpareThreads="25" maxSpareThreads="75"
                        enableLookups="false" redirectPort="8444"
acceptCount="100" debug="0"
                        connectionTimeout="20000"
disableUploadTimeout="true" compression="on"
                        compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
                        compressableMimeType="text/html,text/xml"/>

                <Engine name="StandAlone-Angelina"
backgroundProcessorDelay="-1" defaultHost="localhost" debug="0">
                        <Valve
className="org.apache.catalina.valves.AccessLogValve"
prefix="Angelina_access_log"
                                suffix=".txt" directory="logs" rotatable="true">
                        </Valve>

                        <Logger
className="org.apache.catalina.logger.FileLogger"
                                directory="logs"
prefix="Angelina_access_log" suffix=".txt" timestamp="true"/>

                        <Host name="localhost" debug="0"
appBase="webapps" unpackWARs="true"
                                autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
                                <Context
className="org.apache.catalina.core.StandardContext"
path="/jsp-examples"/>
                                <Context
className="org.apache.catalina.core.StandardContext"
path="/servlets-examples"/>
                                <Context
className="org.apache.catalina.core.StandardContext" path="/webdav"/>
                                <Context
className="org.apache.catalina.core.StandardContext"
path="/tomcat-docs"/>
                                <Context
className="org.apache.catalina.core.StandardContext" path="/ROOT"/>
                        </Host>
                </Engine> 
        </Service>
</Server>

Is this configuration correct ? Is it possible to have it run like this ?
The goal is to have multiples instances of webapps with a limit memory
by webapps !!!

I have successfully configured a single Server with multiples services
but what will be
The behaviour of tomcat is one service need to be restart ? Can i
restart only the mistake
Service or do i need to restart the whole server ? In case of the
tomcat Service can be
Restart without restarting the whole tomcat Server, how do i achieve it ?

King Regards,

Farid

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to