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 getCurricularCourses(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws Exception {        HttpSession session = request.getSession(false);        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        Integer degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID"));        request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);        Object args[] = { degreeCurricularPlanID };        List result = null;        try {            result = (List) ServiceManagerServiceFactory.executeService(userView,                    "ReadCurricularCoursesByDegree", args);        } catch (NonExistingServiceException e) {            throw new NonExistingActionException("error.exception.noStudents", "");        } catch (FenixServiceException e) {            throw new FenixActionException();        }        BeanComparator nameComparator = new BeanComparator("name");        Collections.sort(result, nameComparator);        InfoExecutionDegree infoExecutionDegree = null;        try {            Object args1[] = { degreeCurricularPlanID };            infoExecutionDegree = (InfoExecutionDegree) ServiceManagerServiceFactory                    .executeService(userView, "ReadExecutionDegreeByDCPID", args);        } catch (NonExistingServiceException e) {        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }         request.setAttribute("executionYear", infoExecutionDegree.getInfoExecutionYear().getYear());         request.setAttribute("degree", infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree()         .getNome());        request.setAttribute("curricularCourses", result);        return mapping.findForward("ShowCourseList");    }