tyxiayu 发表于 2017-1-21 10:25:56

Tomcat下JNDI数据源配置

//Tomcat下/conf/context.xml的配置
<!-- The contents of this file will be loaded for each web application -->
<Context path="by"   
docBase="E:\Apache Software Foundation\Tomcat 6.0\webapps\by"   
debug="5"   
reloadable="true"   
crossContext="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<Resource
name="jdbc/by"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
maxIdle="100"
maxWait="5000"
removeAbandoned="true"
logAbndoned="true"
removeAbandonedTimeout="60"
username="root"
password="root"
url="jdbc:mysql://localhost:3306/by?unicode=true&amp;characterEncoding=UTF-8"
maxActive="4"/>
</Context>
页: [1]
查看完整版本: Tomcat下JNDI数据源配置