try { callService(); } catch (ErrorCodeException ece) { switch (ece.getCode()) { case -1: return mapping.findForward("somewhere.jsp"); case 100: // do something case 110: // do something else } throw ece; } return mapping.findForward("success");