Configuration Description:
Configuration in Web. xml
<resource-ref> <description>employees Database for HR applications</description> < Res-ref-name>jdbc/employeedb</res-ref-name> <res-ref-type>javax.sql.datasource</ Res-ref-type> <res-auth>Container</res-auth></resource-ref>
res-ref-name/ res-env-ref-name |
Name of the resource, relative to java:comp/env context |
The corresponding JABC connection pool configuration file:
Tomcat\conf\catalina\localhost\employer.xml
<?xml version= "1.0" encoding= "UTF-8"? ><context docbase= "E:\tomcat\webapps\test" path= "/test" reloadable= " True "><resource name=" Jdbc/employeedb "auth=" Container "type=" Javax.sql.DataSource "maxactive=" "maxidle=" "Maxwait=" username= "root" password= "root" driverclassname= "Com.mysql.jdbc.Driver" url= "jdbc:mysql://" Localhost:3306/test?useunicode=true "/></context>
Considerations for Resource-ref in Web. xml