jsp连oracle(50分)

  • 主题发起人 主题发起人 grays
  • 开始时间 开始时间
G

grays

Unregistered / Unconfirmed
GUEST, unregistred user!
初学jsp,连接oracle时报
D:/Tomcat 4.1/work/Standalone/localhost/test/TMPg8u00a345z_jsp.java:8: package oracle.jdbcdo
es not exist
import oracle.jdbc.*;
^
D:/Tomcat 4.1/work/Standalone/localhost/test/TMPg8u00a345z_jsp.java:17: cannot resolve symbol
symbol : class OracleDriver
location: package driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

我把classes111.zip,和classes12.zip考到了test/WEB-INF/classes下面了,
该如何连接呀
希望提供例子,谢谢
 
路径再看看,把这种连接写在CLASS中吧
 
在系统变量的classpath中添加classes111.zip,和classes12.zip的路径
 
没有用呀出错信息味
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Compiling 1 source file
D:/Tomcat 4.1/work/Standalone/localhost/test/TMPxd9nwa4ed8_jsp.java:16: cannot resolve symbol
symbol : class OracleDriver
location: package driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
^
1 error
 
把classes111.zip,或classes12.zip考到test/WEB-INF/lib下试试
 
问题差不多解决了,看了一些资料说什么有些版本地tomcat对.zip不加载,只加载.jar靠,
unzip出来就好了,散分了
 
多人接受答案了。
 
后退
顶部