Integer degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID")); request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);
Integer degreeCurricularPlanID = null; if(request.getParameter("degreeCurricularPlanID") != null){ degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID")); request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID); }
    public ActionForward prepareChooseTutor(ActionMapping mapping, ActionForm actionForm,            HttpServletRequest request, HttpServletResponse response) throws Exception {        ActionErrors errors = new ActionErrors();        String executionDegreeId = request.getParameter("executionDegreeId");        request.setAttribute("executionDegreeId", executionDegreeId);        Integer degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID"));        request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);        //This code is temporary, it just verify if the coordinator logged is a        // LEEC's coordinator        HttpSession session = request.getSession();        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        Object[] args = { Integer.valueOf(executionDegreeId), userView.getUtilizador(), "LEEC" };        Boolean authorized = Boolean.FALSE;        try {            authorized = (Boolean) ServiceManagerServiceFactory.executeService(userView,                    "UserCoordinatorByExecutionDegree", args);        } catch (FenixServiceException e) {            e.printStackTrace();            errors.add("error", new ActionError("error.tutor.impossibleOperation"));            saveErrors(request, errors);            return mapping.findForward("notAuthorized");        }        if (authorized.booleanValue() == false) {            errors.add("notAuthorized", new ActionError("error.tutor.notAuthorized.LEEC"));            saveErrors(request, errors);            return mapping.findForward("notAuthorized");        }        return mapping.findForward("chooseTutor");    }