root/trunk/calendar3/quickstartFiles/tomcat.conf/server.xml

Revision 2 (checked in by douglm, 7 years ago)

Initial import of bedework

Line 
1 <!-- Example Server Configuration File -->
2 <!-- Note that component elements are nested corresponding to their
3      parent-child relationships with each other -->
4
5 <!-- A "Server" is a singleton element that represents the entire JVM,
6      which may contain one or more "Service" instances.  The Server
7      listens for a shutdown command on the indicated port.
8
9      Note:  A "Server" is not itself a "Container", so you may not
10      define subcomponents such as "Valves" or "Loggers" at this level.
11  -->
12
13 <Server port="8005" shutdown="SHUTDOWN" debug="0">
14
15
16   <!-- Comment these entries out to disable JMX MBeans support -->
17   <!-- You may also configure custom components (e.g. Valves/Realms) by
18        including your own mbean-descriptor file(s), and setting the
19        "descriptors" attribute to point to a ';' seperated list of paths
20        (in the ClassLoader sense) of files to add to the default list.
21        e.g. descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"
22   -->
23   <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
24             debug="0"/>
25   <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
26             debug="0"/>
27
28   <!-- Global JNDI resources -->
29   <GlobalNamingResources>
30
31     <!-- Test entry for demonstration purposes -->
32     <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
33
34     <!-- Editable user database that can also be used by
35          UserDatabaseRealm to authenticate users -->
36     <Resource name="UserDatabase" auth="Container"
37               type="org.apache.catalina.UserDatabase"
38        description="User database that can be updated and saved">
39     </Resource>
40     <ResourceParams name="UserDatabase">
41       <parameter>
42         <name>factory</name>
43         <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
44       </parameter>
45       <parameter>
46         <name>pathname</name>
47         <value>conf/tomcat-users.xml</value>
48       </parameter>
49     </ResourceParams>
50
51   </GlobalNamingResources>
52
53   <!-- A "Service" is a collection of one or more "Connectors" that share
54        a single "Container" (and therefore the web applications visible
55        within that Container).  Normally, that Container is an "Engine",
56        but this is not required.
57
58        Note:  A "Service" is not itself a "Container", so you may not
59        define subcomponents such as "Valves" or "Loggers" at this level.
60    -->
61
62   <!-- Define the Tomcat Stand-Alone Service -->
63   <Service name="Catalina">
64
65     <!-- A "Connector" represents an endpoint by which requests are received
66          and responses are returned.  Each Connector passes requests on to the
67          associated "Container" (normally an Engine) for processing.
68
69          By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
70          You can also enable an SSL HTTP/1.1 Connector on port 8443 by
71          following the instructions below and uncommenting the second Connector
72          entry.  SSL support requires the following steps (see the SSL Config
73          HOWTO in the Tomcat 5 documentation bundle for more detailed
74          instructions):
75          * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
76            later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
77          * Execute:
78              %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
79              $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)
80            with a password value of "changeit" for both the certificate and
81            the keystore itself.
82
83          By default, DNS lookups are enabled when a web application calls
84          request.getRemoteHost().  This can have an adverse impact on
85          performance, so you can disable it by setting the
86          "enableLookups" attribute to "false".  When DNS lookups are disabled,
87          request.getRemoteHost() will return the String version of the
88          IP address of the remote client.
89     -->
90
91     <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
92     <Connector port="8080"
93                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
94                enableLookups="false" redirectPort="8443" acceptCount="100"
95                debug="0" connectionTimeout="20000"
96                disableUploadTimeout="true" />
97     <!-- Note : To disable connection timeouts, set connectionTimeout value
98      to -1 -->
99
100         <!-- Note : To use gzip compression you could set the following properties :
101
102                            compression="on"
103                            compressionMinSize="2048"
104                            noCompressionUserAgents="gozilla, traviata"
105                            compressableMimeType="text/html,text/xml"
106         -->
107
108     <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
109     <!--
110     <Connector port="8443"
111                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
112                enableLookups="false" disableUploadTimeout="true"
113                acceptCount="100" debug="0" scheme="https" secure="true"
114                clientAuth="false" sslProtocol="TLS" />
115     -->
116
117     <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
118     <Connector port="8009"
119                enableLookups="false" redirectPort="8443" debug="0"
120                protocol="AJP/1.3" />
121
122     <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
123     <!-- See proxy documentation for more information about using this. -->
124     <!--
125     <Connector port="8082"
126                maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
127                enableLookups="false"
128                acceptCount="100" debug="0" connectionTimeout="20000"
129                proxyPort="80" disableUploadTimeout="true" />
130     -->
131
132     <!-- An Engine represents the entry point (within Catalina) that processes
133          every request.  The Engine implementation for Tomcat stand alone
134          analyzes the HTTP headers included with the request, and passes them
135          on to the appropriate Host (virtual host). -->
136
137     <!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :
138     <Engine name="Standalone" defaultHost="localhost" debug="0" jvmRoute="jvm1">
139     -->
140
141     <!-- Define the top level container in our container hierarchy -->
142     <Engine name="Catalina" defaultHost="localhost" debug="0">
143
144       <!-- The request dumper valve dumps useful debugging information about
145            the request headers and cookies that were received, and the response
146            headers and cookies that were sent, for all requests received by
147            this instance of Tomcat.  If you care only about requests to a
148            particular virtual host, or a particular application, nest this
149            element inside the corresponding <Host> or <Context> entry instead.
150
151            For a similar mechanism that is portable to all Servlet 2.4
152            containers, check out the "RequestDumperFilter" Filter in the
153            example application (the source for this filter may be found in
154            "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
155
156            Request dumping is disabled by default.  Uncomment the following
157            element to enable it. -->
158       <!--
159       <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
160       -->
161
162       <!-- Global logger unless overridden at lower levels -->
163       <Logger className="org.apache.catalina.logger.FileLogger"
164               prefix="catalina_log." suffix=".txt"
165               timestamp="true"/>
166
167       <!-- Because this Realm is here, an instance will be shared globally -->
168
169       <!-- This Realm uses the UserDatabase configured in the global JNDI
170            resources under the key "UserDatabase".  Any edits
171            that are performed against this UserDatabase are immediately
172            available for use by the Realm.  -->
173       <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
174                  debug="0" resourceName="UserDatabase"/>
175
176       <!-- Comment out the old realm but leave here for now in case we
177            need to go back quickly -->
178       <!--
179       <Realm className="org.apache.catalina.realm.MemoryRealm" />
180       -->
181
182       <!-- Replace the above Realm with one of the following to get a Realm
183            stored in a database and accessed via JDBC -->
184
185       <!--
186       <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
187              driverName="org.gjt.mm.mysql.Driver"
188           connectionURL="jdbc:mysql://localhost/authority"
189          connectionName="test" connectionPassword="test"
190               userTable="users" userNameCol="user_name" userCredCol="user_pass"
191           userRoleTable="user_roles" roleNameCol="role_name" />
192       -->
193
194       <!--
195       <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
196              driverName="oracle.jdbc.driver.OracleDriver"
197           connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
198          connectionName="scott" connectionPassword="tiger"
199               userTable="users" userNameCol="user_name" userCredCol="user_pass"
200           userRoleTable="user_roles" roleNameCol="role_name" />
201       -->
202
203       <!--
204       <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
205              driverName="sun.jdbc.odbc.JdbcOdbcDriver"
206           connectionURL="jdbc:odbc:CATALINA"
207               userTable="users" userNameCol="user_name" userCredCol="user_pass"
208           userRoleTable="user_roles" roleNameCol="role_name" />
209       -->
210
211       <!-- Define the default virtual host
212            Note: XML Schema validation will not work with Xerces 2.2.
213        -->
214       <Host name="localhost" debug="0" appBase="webapps"
215        unpackWARs="true" autoDeploy="true"
216        xmlValidation="false" xmlNamespaceAware="false">
217
218         <!-- Defines a cluster for this node,
219              By defining this element, means that every manager will be changed.
220              So when running a cluster, only make sure that you have webapps in there
221              that need to be clustered and remove the other ones.
222              A cluster has the following parameters:
223
224              className = the fully qualified name of the cluster class
225
226              name = a descriptive name for your cluster, can be anything
227
228              debug = the debug level, higher means more output
229
230              mcastAddr = the multicast address, has to be the same for all the nodes
231
232              mcastPort = the multicast port, has to be the same for all the nodes
233
234              mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
235
236              mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
237
238              tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
239
240              tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
241                                 in case of multiple ethernet cards.
242                                 auto means that address becomes
243                                 InetAddress.getLocalHost().getHostAddress()
244
245              tcpListenPort = the tcp listen port
246
247              tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
248                                   has a wakup bug in java.nio. Set to 0 for no timeout
249
250              printToScreen = true means that managers will also print to std.out
251
252              expireSessionsOnShutdown = true means that
253
254              useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
255                             false means to replicate the session after each request.
256                             false means that replication would work for the following piece of code:
257                             <%
258                             HashMap map = (HashMap)session.getAttribute("map");
259                             map.put("key","value");
260                             %>
261              replicationMode = can be either 'synchronous' or 'asynchronous'.
262                                * Synchronous means that the thread that executes the request, is also the
263                                thread the replicates the data to the other nodes, and will not return until all
264                                nodes have received the information.
265                                * Asynchronous means that there is a specific 'sender' thread for each cluster node,
266                                so the request thread will queue the replication request into a "smart" queue,
267                                and then return to the client.
268                                The "smart" queue is a queue where when a session is added to the queue, and the same session
269                                already exists in the queue from a previous request, that session will be replaced
270                                in the queue instead of replicating two requests. This almost never happens, unless there is a
271                                large network delay.
272         -->
273
274         <!-- When uncommenting the cluster, REMEMBER to uncomment the replication Valve below as well
275
276
277         <Cluster  className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
278                   name="FilipsCluster"
279                   debug="10"
280                   serviceclass="org.apache.catalina.cluster.mcast.McastService"
281                   mcastAddr="228.0.0.4"
282                   mcastPort="45564"
283                   mcastFrequency="500"
284                   mcastDropTime="3000"
285                   tcpThreadCount="2"
286                   tcpListenAddress="auto"
287                   tcpListenPort="4001"
288                   tcpSelectorTimeout="100"
289                   printToScreen="false"
290                   expireSessionsOnShutdown="false"
291                   useDirtyFlag="true"
292                   replicationMode="synchronous"
293         />
294         -->
295         <!--
296             When configuring for clustering, you also add in a valve to catch all the requests
297             coming in, at the end of the request, the session may or may not be replicated.
298             A session is replicated if and only if all the conditions are met:
299             1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
300             2. a session exists (has been created)
301             3. the request is not trapped by the "filter" attribute
302
303             The filter attribute is to filter out requests that could not modify the session,
304             hence we don't replicate the session after the end of this request.
305             The filter is negative, ie, anything you put in the filter, you mean to filter out,
306             ie, no replication will be done on requests that match one of the filters.
307             The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
308
309             filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
310             ending with .gif and .js are intercepted.
311         -->
312         <!--
313         <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
314                filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
315
316         -->
317         <!-- Normally, users must authenticate themselves to each web app
318              individually.  Uncomment the following entry if you would like
319              a user to be authenticated the first time they encounter a
320              resource protected by a security constraint, and then have that
321              user identity maintained across *all* web applications contained
322              in this virtual host. -->
323         <!--
324         <Valve className="org.apache.catalina.authenticator.SingleSignOn"
325                    debug="0"/>
326         -->
327
328         <!-- Access log processes all requests for this virtual host.  By
329              default, log files are created in the "logs" directory relative to
330              $CATALINA_HOME.  If you wish, you can specify a different
331              directory with the "directory" attribute.  Specify either a relative
332              (to $CATALINA_HOME) or absolute path to the desired directory.
333         -->
334         <!--
335         <Valve className="org.apache.catalina.valves.AccessLogValve"
336                  directory="logs"  prefix="localhost_access_log." suffix=".txt"
337                  pattern="common" resolveHosts="false"/>
338         -->
339
340         <!-- Logger shared by all Contexts related to this virtual host.  By
341              default (when using FileLogger), log files are created in the "logs"
342              directory relative to $CATALINA_HOME.  If you wish, you can specify
343              a different directory with the "directory" attribute.  Specify either a
344              relative (to $CATALINA_HOME) or absolute path to the desired
345              directory.-->
346         <Logger className="org.apache.catalina.logger.FileLogger"
347                  directory="logs"  prefix="localhost_log." suffix=".txt"
348             timestamp="true"/>
349
350         <!-- Define properties for each web application.  This is only needed
351              if you want to set non-default properties, or have web application
352              document roots in places other than the virtual host's appBase
353              directory.  -->
354
355         <!-- Tomcat Root Context -->
356         <!--
357           <Context path="" docBase="ROOT" debug="0">
358         -->
359
360        <!-- make the cal DataSource available in all contexts -->
361        <DefaultContext>
362           <Resource name="jdbc/calDB" auth="Container"
363                     type="javax.sql.DataSource"/>
364           <ResourceParams name="jdbc/calDB">
365             <parameter>
366               <name>username</name>
367               <value>sa</value>
368             </parameter>
369             <parameter>
370               <name>password</name>
371               <value></value>
372             </parameter>
373             <parameter>
374               <name>driverClassName</name>
375               <value>org.hsqldb.jdbcDriver</value>
376             </parameter>
377             <parameter>
378               <name>url</name>
379               <value>jdbc:hsqldb:hsql://localhost:8887</value>
380             </parameter>
381             <parameter>
382               <name>maxActive</name>
383               <value>8</value>
384             </parameter>
385             <parameter>
386               <name>maxIdle</name>
387               <value>4</value>
388             </parameter>
389           </ResourceParams>
390         </DefaultContext>
391
392         <!-- turn off session persistence by supplying an empty pathname for
393              these contexts -->
394         <Context path="/caladmin" docBase="caladmin" debug="0">
395           <Manager
396             className="org.apache.catalina.session.StandardManager"
397             pathname="" />
398         </Context>
399
400         <Context path="/cal" docBase="cal" debug="0">
401           <Manager
402             className="org.apache.catalina.session.StandardManager"
403             pathname="" />
404         </Context>
405
406         <Context path="/ucal" docBase="ucal" debug="0">
407           <Manager
408              className="org.apache.catalina.session.StandardManager"
409              pathname="" />
410         </Context>
411
412       </Host>
413
414     </Engine>
415
416   </Service>
417
418 </Server>
Note: See TracBrowser for help on using the browser.