<%@ page language="Java" import="java.sql.*,javax.sql.*,java.util.*,java.io.*;"%>
<%
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@192.168.1.230:1521:shanghai";
//orcl为你的数据库的SID
String user="bug";
String password="wangbug";
Connection conn= DriverManager.getConnection(url,user,password);
if(conn!=null){
%>
<B> Success!</b>
<%
System.out.println("Connection"+conn);
}else{
%>
<B> Faild!</b>
<%
System.out.println("Connection"+conn);
}
%>
<%
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@192.168.1.230:1521:shanghai";
//orcl为你的数据库的SID
String user="bug";
String password="wangbug";
Connection conn= DriverManager.getConnection(url,user,password);
if(conn!=null){
%>
<B> Success!</b>
<%
System.out.println("Connection"+conn);
}else{
%>
<B> Faild!</b>
<%
System.out.println("Connection"+conn);
}
%>