http://www.missyuan.net/html/bc/jsp/20070114/594_8.html
classpath:
.;%JAVA_HOME%\lib\dt.jar;
%JAVA_HOME%\lib\tools.jar;
(.;
C:\j2sdk1.4.2_14\lib\mysql-connector-java-3.1.14-bin-g.jar;
D:\Program Files\Java\mysqlforjdbc\mysql-connector-java-3.1.14-bin.jar;
JAVA_HOME:
c:\j2sdk1.4.2_14
path:
%JAVA_HOME%\bin;C:\Program Files\MySQL\MySQL Server 4.1\bin
在JSP文件所在文件夹下面建立文件夹WEB-INF
并在内
复制mysql-connector-java-3.1.14-bin.jar
建立web.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>My Web Application</display-name>
<description>
A application for test.
</description>
</web-app>
建立D:\Program Files\Java\mysqlforjdbc
并将mysql-connector-java-3.1.14-bin.jar 复制在其内
在C:\Tomcat 5.0\shared\lib
C:\Tomcat 5.0\common\lib
复制
mysql-connector-java-3.1.14-bin.jar