My code:
public Connection connectUsing(String path) throws SQLException
{
Properties props = new Properties();
FileInputStream in;
try
{
in = new FileInputStream(path);
props.load(in);
}
catch (Exception e)
{
System.out.println("Exception: " + e + "detected...");
return null;
}
String driver = props.getProperty("jdbc.drivers");
if (driver != null){System.setProperty("jdbc.drivers", driver);}
String url = props.getProperty("jdbc.url");
Properties x = new Properties();
x.put("user", props.getProperty("jdbc.user"));
x.put("password", props.getProperty("jdbc.password"));
try {return DriverManager.getConnection(url,x);}
catch(Exception e)
{
System.out.println("Connection failed due to: " + e);
return null; //line 60!!!!
}
}
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html