// do some stuff } catch (IOException) { // handle error response.sendRedirect("/errorPage.jsp"); } finally { jdbcConnection.close(); } ********************************
case B: try {
// do some stuff } catch (IOException) { // handle error return "IOException"; } finally { jdbcConnection.close(); } ****************************************
My question is --- Will the "jdbcConnection.close()" be executed (i.e. closing the jdbc Connection) in both Case A and B when there is IOException raised ? (One is redirecting page and one is returning out of subroutine)