} catch (DomainException domainException){ final ActionErrors actionErrors = new ActionErrors(); actionErrors.add("error", new ActionError(domainException.getMessage())); saveErrors(request, actionErrors);
    public ActionForward removeTeacher(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException,            FenixFilterException {        HttpSession session = getSession(request);        String teacherCodeString = request.getParameter("teacherCode");        if (teacherCodeString == null) {            teacherCodeString = (String) request.getAttribute("teacherCode");        }        Integer teacherCode = new Integer(teacherCodeString);        Integer objectCode = getObjectCode(request);        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        Object args[] = { objectCode, teacherCode };        try {            ServiceManagerServiceFactory.executeService(userView, "DeleteTeacher", args);        } catch (NotAuthorizedFilterException e) {            final ActionErrors actionErrors = new ActionErrors();            actionErrors.add("error.invalidTeacherRemoval", new ActionError("error.invalidTeacherRemoval"));            saveErrors(request, actionErrors);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        return viewTeachersByProfessorship(mapping, form, request, response);    }