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