This works fine with one irritating little problem: since each JDBCAccess method can throw SQLException, each use of them within a servlet must do a boilerplate try/catch in order to re-throw it as ServletException, e.g.
try {
JDBC.doSomething();
} catch (SQLException e) {
throw new ServletException(e);
}I can't declare my servlets to throw SQLException, partly because I don't want to and of course because the spec doesn't allow it anyway. Is there a simpler way? Can I maybe define my own exception class to "translate" between SQLException and ServletException, and if so what would that look like? Would it inherit from ServletException or SQLException?
Thanks,
MB
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
