tomcat context配置

来源:互联网 发布:在线合成图片软件 编辑:程序博客网 时间:2024/06/06 10:00
<Context path="/aaa-app" docBase="aaa-app" reloadable="false">        <Resource auth="Container"        driverClassName="oracle.jdbc.driver.OracleDriver"        factory="org.apache.commons.dbcp.BasicDataSourceFactory"        type="javax.sql.DataSource"        testOnBorrow="true"        testOnReturn="true"        timeBetweenEvictionRunsMillis="60000"        maxActive="20"        maxIdle="5" maxWait="5000"        name="jdbc/IpbDB"        username="girtsi"        password="girtsi"        url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxx)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = xxxxx)))" />            </Context>
 

把这一段加在以下path

F:\development\apache-tomcat-7.0.20\conf\Catalina\localhost

这样就可以在tomcat里配置数据库连接属性了