Note: a "Server" is not itself a "container", SO you may not define Subcomponents Such as "Valves" or "loggers" at this level. ->
<-! Comment these entries out to disable JMX MBeans support -> <-! You may also configure custom components (eg Valves / Realms) by including your own mbean-descriptor file (s), and setting the "descriptors" attribute to point to a ';' seperated list of paths (in the ClassLoader sense) of files to add to the default list eg descriptors = "/ com / myfirm / mypackage / mbean-descriptor.xml" ->
<-! Editable user database that can also be used by UserDatabaseRealm to authenticate users ->
Note: a "Service" is not itself A "container", SO you may not define Subcomponents Such As "Valves" or "loggers" at this level. ->
By default, a non-SSL HTTP / 1.1 Connector is established on port 8080. You can also enable an SSL HTTP / 1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 5 documentation bundle for more detailed instructions): * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or later, and put the JAR files into "$ JAVA_HOME / jre / lib / ext "* Execute:% java_home% / bin / keytool -genkey -alias tomcat -keyalg rsa (windows) $ java_home / bin / keytool -genkey -alias tomcat -keyalg RSA (UNIX) with a password value of" changeit "for Both THE CERTIFICATE AND THE Keystore Itself.by Default, DNS Lookups Are Enabled When A Web Application Calls Request.getRemotehost (). THIS CAN HAVE AN Adverse Impact ON Performance, So you can disable it by se Tting the "enablelookups" attribute to "false". When DNS Lookups are disabled, request.getRemotehost () Will Return The string version of the ip address of the remote client. ->
->
->
<-! The request dumper valve dumps useful debugging information about the request headers and cookies that were received, and the response headers and cookies that were sent, for all requests received by this instance of Tomcat If you care only about requests to a. Particular Virtual Host, OR a Particular Application, Nest this element inside the corresponding
For a similar mechanism that is portable to all Servlet 2.4 containers, check out the "RequestDumperFilter" Filter in the example application (the source for this filter may be found in "$ CATALINA_HOME / webapps / examples / WEB-INF / classes / filters" ) .Request dumping is disabled by default. UNcomment The following element to enable it. -> ->
<-! This Realm uses the UserDatabase configured in the global JNDI resources under the key "UserDatabase" Any edits that are performed against this UserDatabase are immediately available for use by the Realm -..>
Org.Apache.catalina.Realm.MemoryRealm "/> ->
-> <-!
! <-
ClassName = The full qualified name of the cluster class
Name = a descriptive name for your cluster, can be anything
Debug = the debug level, Higher Means More Output
Mcastaddr = The Multicast Address, Has to Be The Same For All The Nodes
Mcastport = The Multicast Port, Has to Be The Same For All The Nodes
Mcastfrequency = the number of milliseconds in between send a "i'm alive" Heartbeat
McastDroptime = The number a milliseconds before a node is considered "dead" if no healthbeat is receivated
TCPTHREADS TO Handle Incoming Replication Requests, Optimal Would Be The Same Amount of Threads As Nodes
TCPLISTENADDRESS = TCP Cluster Request On this Host, In Case of Multiple Ethernet Cards inetaddress.getlocalhost (). gethostaddress ()
TCPListenport = TCP Listen Port
tcpSelectorTimeout = the timeout (ms) for the Selector.select () method in case the OS has a wakup bug in java.nio. Set to 0 for no timeoutprintToScreen = true means that managers will also print to std.out
ExpiresessionsSonshutdown = true means That
useDirtyFlag = true means that we only replicate a session after setAttribute, removeAttribute has been called false means to replicate the session after each request false means that replication would work for the following piece of code:.. <% HashMap map = (HashMap) session .getAttribute ( "map"); map.put ( "key", "value");.%> replicationMode = can be either 'synchronous' or 'asynchronous' * Synchronous means that the thread that executes the request, is also the thread the replicates the data to the other nodes, and will not return until all nodes have received the information. * Asynchronous means that there is a specific 'sender' thread for each cluster node, so the req uest thread will queue the replication request into a "smart" queue, and then return to the client. The "smart" queue is a queue where when a session is added to the queue, and the same session already exists in the queue from a Previous Request, That Session Will Be Replaced In The Queue Instead of Replicating TWU Requests. This Almost Never Happens, Unless There is A Large Network delay. -> <
! - When uncommenting the cluster, REMEMBER to uncomment the replication Valve below as well
The filter attribute is to filter out requests that could not modify the session, hence we do not replicate the session after the end of this request. The filter is negative, ie, anything you put in the filter, you mean to filter out, IE, No Replication Will Be Done on Requests That Match One of the Filters. The filter attribute is delimited by; so you can't escape out; even if you wanted to.filter = ". * /. GIF;. * / .js; "Means That We Will NOT Replicate The session with .gif and .js are intercept. ->
-> <-! Normally, users must authenticate themselves to each web app individually Uncomment the following entry if you would like a user to be authenticated the first time they encounter a resource protected by a security constraint, and then have that user. Identity Maintained Across * All * Web Applications Contained in this Virtual Host. -> "org.apache.catalina.authenticator.singLesignon" debug = "0" /> ->
<-! Access log processes all requests for this virtual host By default, log files are created in the "logs" directory relative to $ CATALINA_HOME If you wish, you can specify a different directory with the "directory" attribute Specify... either a relative (to $ CATALINA_HOME) or absolute path to the desired directory -.>
<-!. Define properties for each web application This is only needed if you want to set non-default properties, or have web application document roots in places other than the virtual host's appBase directory -.>
->
Service>
Server>