Configuring the connection pool on the management interface is much safer and more convenient than modifying the XML file.
1. log on to the Management page
Http: // localhost: 8080/admin
Password and user name set when you install, if you forget (or not), go to modify tomcat/CONF/tomcat-users.xml, Add Admin and manager two role, one user, the user's role can be admin and manager, and can be modified by copying the original XML.
2. Setup steps
2.1 click the circle on the left of the service menu item in the left frame to expand the list.
2.2 click the circle on the left of the host (localhost) menu item in the frame on the left to expand the list.
2.3 click the circle on the left of the menu item in the working directory of the connection pool to be added to the framework on the left to expand the list.
2.4 click data sources CAI in the left frame, and the setting page appears on the right frame.
2.5 select create new data source from the data source actions drop-down list in the upper-right corner of the framework on the right.
2.6 example:
| JNDI Name: |
JDBC/mydatasource |
| Data source URL: |
JDBC: oracle: thin: @ localhost: 1521: myoracle |
| JDBC driver class: |
Oracle. JDBC. Driver. oracledriver |
| User name: |
Test |
| Password: |
Test |
2.7 click Save in the upper-right corner of the frame on the right.
2.8 click the Commit Changes button on the top.
2.9 usage example: Click to view dbwrapper. Java
2.10 Images