CCL Home Page
Up Directory CCL node9.html
/etc/tomcat/server.xml next up previous contents
Next: /etc/apache/mod_jk/workers.properties Up: Configuration Previous: /etc/apache/mod_jk/tomcat-auto   Contents

/etc/tomcat/server.xml

This is the main configuration file for Tomcat. Most of it should be set correctly and can be left alone. Please note the section:

<Connector className="org.apache.tomcat.service.PoolTcpConnector">

  <Parameter name="handler"

   value="org.apache.tomcat.service.http.HttpConnectionHandler"/>

  <Parameter name="port"

  value="8081"/>

</Connector>
This configures Tomcat to be an HTTP server on port 8081. You probably do not want this in a production environment, it is a security risk, so comment it out once you have set everything up. Comments are done like in HTML, with <!- ... ->.

Near the bottom of the file is the Context section. Here is where you add new web applications.

<Context path="/examples"

 docBase="webapps/examples"

 crossContext="false"

 debug="0"

 reloadable="true" >

</Context>
The path defines the URL path that this context is for. In this example, that would be http://localhost/examples/. docBase specifies where the web application is to be found. You may specify absolute paths, but if you put a relative path it will be relative to TOMCAT_HOME which is /usr/share/tomcat in Debian, by default. crossContext allows the web app to access other contexts, default is true. Default for debug is 0. reloadable=''true'' will cause the web application to be recompiled each time it is accessed, which may be bad for a production environment; default is ``true'' however.

When you add a Context to this file, you must update the tomcat.conf that you copied from tomcat-auto, if you decided to copy it. When you do Virtual Hosts (see Section [*]), you must add the information that would normally go in tomcat-auto to the correct <VirtualHost> section instead.


next up previous contents
Next: /etc/apache/mod_jk/workers.properties Up: Configuration Previous: /etc/apache/mod_jk/tomcat-auto   Contents
2001-05-26
Modified: Sun May 27 22:08:42 2001 GMT
Page accessed 4543 times since Mon Feb 3 15:24:51 2003 GMT