protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) {
Connection conn = null;
try {
conn = DriverManager.getConnection("url", "user", "password");
}
catch (SQLException exc) {
LogUtility.log(exc);
}
finally {
if (conn != null) {
try {
conn.close();
}
catch (SQLException exc) {
LogUtility.log(exc);
}
}
}
}
|
|