<%@ page import="java.sql.*"
Connection connection = null;
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
String host="miohost";
String sid="dbserver";
int port=1521;
String oracle="jdbcracle
ci:@"+host+":"+port+":sid";
String user="scott";
String pwd="tiger";
connection = DriverManager.getConnection(oracle,user,pwd);
connection.close();
}
catch (ClassNotFoundException e)
{
out.println("Nessun driver!");
}
catch (SQLException e)
{
out.println("Non è possibile caricare il driver!");
}
finally
{
try
{
if (connection != null) connection.close();
}
catch (SQLException e)
{
}
}
%>