⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server.xml

📁 本系统是B2C模式的网上交易平台 运行环境:Tomact+JDK 编程模式:JSP+JavaBean+JavaServlet 后台数据库:MS-Access 系统主要完成的功能如下: 客
💻 XML
📖 第 1 页 / 共 2 页
字号:
      <!-- Replace the above Realm with one of the following to get a Realm           stored in a database and accessed via JDBC -->      <!--      <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"             driverName="org.gjt.mm.mysql.Driver"          connectionURL="jdbc:mysql://localhost/authority"         connectionName="test" connectionPassword="test"              userTable="users" userNameCol="user_name" userCredCol="user_pass"          userRoleTable="user_roles" roleNameCol="role_name" />      -->      <!--      <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"             driverName="oracle.jdbc.driver.OracleDriver"          connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"         connectionName="scott" connectionPassword="tiger"              userTable="users" userNameCol="user_name" userCredCol="user_pass"          userRoleTable="user_roles" roleNameCol="role_name" />      -->      <!--      <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"             driverName="sun.jdbc.odbc.JdbcOdbcDriver"          connectionURL="jdbc:odbc:CATALINA"              userTable="users" userNameCol="user_name" userCredCol="user_pass"          userRoleTable="user_roles" roleNameCol="role_name" />      -->      <!-- Define the default virtual host           Note: XML Schema validation will not work with Xerces 2.2.       -->      <Host name="localhost" debug="0" appBase="webapps"       unpackWARs="true" autoDeploy="true"       xmlValidation="false" xmlNamespaceAware="false">        <!-- Defines a cluster for this node,             By defining this element, means that every manager will be changed.             So when running a cluster, only make sure that you have webapps in there             that need to be clustered and remove the other ones.             A cluster has the following parameters:             className = the fully 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 sending a "I'm alive" heartbeat             mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received             tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes              tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,                                 in case of multiple ethernet cards.                                auto means that address becomes                                InetAddress.getLocalHost().getHostAddress()             tcpListenPort = the 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 timeout             printToScreen = true means that managers will also print to std.out             expireSessionsOnShutdown = 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 'pooled', 'synchronous' or 'asynchronous'.                               * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.                               * 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 request 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 two requests. This almost never happens, unless there is a                                large network delay.        -->                     <!--            When configuring for clustering, you also add in a valve to catch all the requests            coming in, at the end of the request, the session may or may not be replicated.            A session is replicated if and only if all the conditions are met:            1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND            2. a session exists (has been created)            3. the request is not trapped by the "filter" attribute            The filter attribute is to filter out requests that could not modify the session,            hence we don't 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 after requests with the URI            ending with .gif and .js are intercepted.        -->                <!--        <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"                 managerClassName="org.apache.catalina.cluster.session.DeltaManager"                 expireSessionsOnShutdown="false"                 useDirtyFlag="true">            <Membership                 className="org.apache.catalina.cluster.mcast.McastService"                mcastAddr="228.0.0.4"                mcastPort="45564"                mcastFrequency="500"                mcastDropTime="3000"/>            <Receiver                 className="org.apache.catalina.cluster.tcp.ReplicationListener"                tcpListenAddress="auto"                tcpListenPort="4001"                tcpSelectorTimeout="100"                tcpThreadCount="6"/>            <Sender                className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"                replicationMode="pooled"/>            <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"                   filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>        </Cluster>        -->                <!-- 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. -->        <!--        <Valve className="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.        -->        <!--        <Valve className="org.apache.catalina.valves.AccessLogValve"                 directory="logs"  prefix="localhost_access_log." suffix=".txt"                 pattern="common" resolveHosts="false"/>        -->        <!-- Logger shared by all Contexts related to this virtual host.  By             default (when using FileLogger), 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.-->        <Logger className="org.apache.catalina.logger.FileLogger"                 directory="logs"  prefix="localhost_log." suffix=".txt"            timestamp="true"/><Context path="" docBase="D:\jsp" debug="0" reloadable="true" workDir="D:\jsp\work"></Context>      </Host>    </Engine>  </Service></Server>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -