Configuration method for Tomcat data sources in jbuilder

xiaoxiao2021-03-06  52

When you are compiling your JSP, servlet, your WebMod folder will generate a Tomcat folder, open the conf folder under this folder, open the Serverxxxx.xml file (XXXX corresponds to the port used by your Tomcat) ). You will find that the second line has a note:

Remove this line of comments, then in this file

Configure a data source between the tag, similar to the following form:

Auth = "container"

TYPE = "javax.sql.datasource" />

factory

org.apache.commons.dbcp.basicDataSourceFactory

maxactive

14

maxidle

14

maxwait

10000

Username

test

Password

test

driverclassname

Oracle.jdbc.driver.Oracledriver

URL jdbc: Oracle: OCI8: @Test

* This example uses Oracle 9i's JDBCDriver, please add the following code to your Web.xml according to your database system: Add the following code to your web.xml according to your database system:

DB Connection

JDBC / TESTDB

javax.sql.datasource

container

Copy Commons-Collectes.jar, Commons-Pool.jar, and Your JDBCDriver.jar. Several files in the Tomcat in the Tomcat comes with (path to: x: x: x: / jbuilderx /thirdparty/jakarta-tomcat-4.1.27-le-jdk14/common/lib)

Restart JBUILDER, the data source should be used :-)

转载请注明原文地址:https://www.9cbs.com/read-115743.html

New Post(0)