请教关于JSP连接MYSQL数据库连接池的配置以及使用方法,本人从书上配置好后,但是在编译时总是找不到类包,虽然我已经在SERVER.xml和WEB。XML下已经配置完,但是具体什么意思也不清楚,书上没有具体说明配置的详细意思,现在请教各位,将本人配置也写在下面
MYSQL 的数据库名为lianxi 用户名ROOT密码111,在tomcat的ROOT下新建了一个目录panligang
SERVER.xml添加配置如下
<Context path= "/panligang " docBase= "panligang " debug= "5 " reloadable= "true " crossContext= "true ">
<Logger className= "org.apache.catalina.logger.FileLogger " prefix= "localhost_DBTest_log. " suffix= ".txt " timestamp= "true "/>
<Resource name= "jdbc/mysql/lianxi " auth= "Container " type= "javax.sql.DataSource "/>
<ResourceParams name= "jdbc/lianxi ">
<parameter>
<name> factory </name>
<value> org.apache.commons.dbcp.BasicDataSourceFactory </value>
</parameter>
<!-- Class name for mm.mysql JDBC driver -->
<parameter>
<name> driverClassName </name>
<value> com.mysql.jdbc.Driver </value>
</parameter>
<!-- The JDBC connection url for connecting to your MySQL dB.