当前位置: 技术问答>java相关
jsp 连数据库连不上?新手请各位大虾帮忙!
来源: 互联网 发布时间:2015-11-13
本文导语: 连orale数据库为什么连不上?以下是我的程序请指教: 错误提示: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception ...
连orale数据库为什么连不上?以下是我的程序请指教:
错误提示:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
错误提示:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
|
oracle的
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@133.166.200.73:1521:ora73";
String user="asset";
String password="asset";
Connection con= DriverManager.getConnection(url,user,password);
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@133.166.200.73:1521:ora73";
String user="asset";
String password="asset";
Connection con= DriverManager.getConnection(url,user,password);
|
....
string url =new string();
url = "com.borland.datastore.jdbc.DataStoreDriver";
java.sql.Connection Con;
java.sql.Statement sqlStmt;
class.forname("com.borland.datastore.jdbc.DataStoreDriver");
con = drivermanager.getconnection(url,"dba","sql");//有错误
databasemetadata dma = con.getmetadata();
out.println("connect to :" +dma.geturl());
.....
更改为==> con = Drivermanager.getconnetion(url,"dba","sql");//注意大小写
string url =new string();
url = "com.borland.datastore.jdbc.DataStoreDriver";
java.sql.Connection Con;
java.sql.Statement sqlStmt;
class.forname("com.borland.datastore.jdbc.DataStoreDriver");
con = drivermanager.getconnection(url,"dba","sql");//有错误
databasemetadata dma = con.getmetadata();
out.println("connect to :" +dma.geturl());
.....
更改为==> con = Drivermanager.getconnetion(url,"dba","sql");//注意大小写