方法一:
tomcat-->conf-->context.xml--><Context>节点下加入
<Resource name="PROJ_JDBC"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="cggl"
password="cggl"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:orcl" />
方法二:
tomcat-->conf-->新建Catalina-->Localhost-->项目名.xml
<?xml version='1.0' encoding='utf-8'?>
<Context path ="/fx" <!--项目名称-->
docBase ="F:\中科智水\zhishui\fx\WebRoot" <!--项目的webroot-->
debug ="0" privileged ="true" reloadable ="false" >
<Resource name="fxyj_jdbc"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="fxyj"
password="fxyj"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@10.2.103.9:1521:ora" />
</Context>
tomcat-->conf-->context.xml--><Context>节点下加入
<Resource name="PROJ_JDBC"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="cggl"
password="cggl"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:orcl" />
方法二:
tomcat-->conf-->新建Catalina-->Localhost-->项目名.xml
<?xml version='1.0' encoding='utf-8'?>
<Context path ="/fx" <!--项目名称-->
docBase ="F:\中科智水\zhishui\fx\WebRoot" <!--项目的webroot-->
debug ="0" privileged ="true" reloadable ="false" >
<Resource name="fxyj_jdbc"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="fxyj"
password="fxyj"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@10.2.103.9:1521:ora" />
</Context>