Understanding Server.xml


The server.xml file under conf folder is the core configuration file for the tomcat server. So it is very important for the server administrator to understand the different sections of the file. The following are the configuration setting given in the file:-



  • The first section describes the various lifecycle listeners and Global resources. The following is the code in the section.


<!--APR library loader. Documentation at /docs/apr.html -->

<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->

<Listener className="org.apache.catalina.core.JasperListener" />

<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->

<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />

<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />



<!-- Global JNDI resources

Documentation at /docs/jndi-resources-howto.html

-->

<GlobalNamingResources>

<!-- Editable user database that can also be used by

UserDatabaseRealm to authenticate users

-->

<Resource name="UserDatabase" auth="Container"

type="org.apache.catalina.UserDatabase"

description="User database that can be updated and saved"

factory="org.apache.catalina.users.MemoryUserDatabaseFactory"

pathname="conf/tomcat-users.xml" />

</GlobalNamingResources>



  • Next section is defining the various services it offers. The Catalina is the default service provided by tomcat which has various settings for connectors and port addresses for those connectors. It also contains the engine tag and virtual host for the server.

                    

Copyright © 2014 VisualBuilder. All rights reserved