Configure the DBCP connection pool
Configure the DBCP connection pool, which contains the project connection data library information. Tomcat creates the DBCP object and places it in JNDI. Then we can obtain the database connection information.
For specific configuration, see the following connection
Http://blog.csdn.net/seeds_home/article/details/6999228
Http://blog.csdn.net/seeds_home/article/details/6999037
Directly write on the JSP page
Driver="Com. MySQL. JDBC. Driver"
User="Root"
Password="10000"
URL="JDBC: mysql: // localhost: 3306/product"
Tomcat will encapsulate the above information, create an object, place it in the JNDI, and then relookup from the JNDI, so both methods are the same. However, the first method is recommended, centralized in configuration file
Relatively standard. If no scope is configured, the default value is page.