把驱动拷贝到/common/lib下,然后改server.xml和web.xml,
server.xml加如下(里):
debug="5" reloadable="true" crossContext="true">
prefix="localhost_DBTest_log." suffix=".txt"
timestamp="true"/>
auth="Container"
type="javax.sql.DataSource"/>
factory
org.apache.commons.dbcp.BasicDataSourceFactory
username
root
password
driverClassName
com.mysql.jdbc.Driver
url
jdbc:mysql://localhost:3306/mydatabase?useUnicode=true&characterEncoding=gb2312
web.xml:
DB Connection jdbc/mydatasource javax.sql.DataSource Container