zoukankan      html  css  js  c++  java
  • tomcat6.0 数据源的配置

    tomcat数据源的配置方式有多种。

    以下是其中一种配置方式:

    各个版本的tomcat的数据源的配置也是有区别的,请注意我这里的tomcat版本是6.0的。

    1,首先找到tomcat数据源的配置文件

    tomcat安装路径\context.xml

    例如我的是E:\tomcat6\conf

    E:\tomcat就是我的tomcat的安装路径

    2.配置文件如下:

    <?xml version='1.0' encoding='utf-8'?>
    
    <!-- The contents of this file will be loaded for each web application -->
    <Context>
       <Resource   name="jdbc/erp" auth="Container" type="javax.sql.DataSource"
                   maxActive="100" maxIdle="30" maxWait="10000"
                   username="root" password="root" 
                   driverClassName="com.mysql.jdbc.Driver"
                   url="jdbc:mysql://127.0.0.1:3306/erp"/>           
        <!-- Default set of monitored resources -->
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
    	
        <!-- Uncomment this to disable session persistence across Tomcat restarts -->
        <!--
        <Manager pathname="" />
        -->
    
        <!-- Uncomment this to enable Comet connection tacking (provides events
             on session expiration as well as webapp lifecycle) -->
        <!--
        <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
        -->
    </Context>


    中间的注释可以省略,不过个人觉得留着更好。

  • 相关阅读:
    java DES转C#DES加密解密
    PIE SDK影像格式转换
    PIE SDK位深转换
    PIE SDK存储格式转换
    PIE SDK栅格生成等值线、面
    PIE SDK反距离权重插值算法
    PIE SDK克里金插值法
    PIE SDK热力图
    PIE SDK Alpha通道数据渲染
    PIE SDK 多数据源的复合数据集加载
  • 原文地址:https://www.cnblogs.com/mengjianzhou/p/5986876.html
Copyright © 2011-2022 走看看