Configure the project path under Tomcat's Conf/catalina/localhost directory, and tomcat boot will load the project directly according to the configuration.
Although the configuration is a word, but often forget, write down today.
If your project is famous for: Mypro, then your file is named: Mypro.xml.
A word in the file: <context docbase= "D:\Workspaces\mypro\WebRoot" path= "/mypro" reloadable= "true"/>
Docbase is the project path, and path is the project name.
D:\Program Files\apachetomcat\tomcat 6.0\conf\catalina\localhost\mypro.xml
<?xml version= "1.0" encoding= "UTF-8"? ><context docbase= "D:\Program files\apachetomcat\tomcat 6.0\webapps\ Mypro "path="/mypro "reloadable=" true "><resource name=" Jdbc/mypro "auth=" Container "type=" Javax.sql.DataSource "maxactive=" "maxidle=" "maxwait=" "username=" "root" password= "root" driverclassname= " Com.mysql.jdbc.Driver "url=" Jdbc:mysql://localhost:3306/mypro?useunicode=true "/></context>
In the project's Web. XML configuration:
<resource-ref> <description>mysql database connection pool </description> <res-ref-name>jdbc/mypro </res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>container </res-auth></resource-ref>
Configuring connection pooling in Tomcat