Integer degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID"));
Integer degreeCurricularPlanID = null; if(request.getParameter("degreeCurricularPlanID") != null){ degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID")); request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID); }
    public ActionForward getStudentsFromDCP(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws Exception {        HttpSession session = request.getSession(false);        if (session != null) {            IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);            Integer degreeCurricularPlanID = new Integer(request.getParameter("degreeCurricularPlanID"));            List result = null;            try {                Object args[] = { degreeCurricularPlanID, TipoCurso.MESTRADO_OBJ };                result = (List) ServiceManagerServiceFactory.executeService(userView,                        "ReadStudentsFromDegreeCurricularPlan", args);            } catch (NotAuthorizedException e) {                return mapping.findForward("NotAuthorized");            } catch (NonExistingServiceException e) {                throw new NonExistingActionException("error.exception.noStudents", "");            }            BeanComparator numberComparator = new BeanComparator("infoStudent.number");            Collections.sort(result, numberComparator);            request.setAttribute(SessionConstants.STUDENT_LIST, result);            InfoExecutionDegree infoExecutionDegreeForRequest = null;            try {                Object args[] = { degreeCurricularPlanID };                infoExecutionDegreeForRequest = (InfoExecutionDegree) ServiceManagerServiceFactory                        .executeService(userView, "ReadExecutionDegreeByDCPID", args);            } catch (NonExistingServiceException e) {            } catch (FenixServiceException e) {                throw new FenixActionException(e);            }            if (infoExecutionDegreeForRequest != null) {                request.setAttribute("infoExecutionDegree", infoExecutionDegreeForRequest);            }            request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanID);            String value = (String) request.getParameter("viewPhoto");            if (value != null && value.equals("true")) {                request.setAttribute("viewPhoto", Boolean.TRUE);            } else {                request.setAttribute("viewPhoto", Boolean.FALSE);            }            return mapping.findForward("PrepareSuccess");        }        throw new Exception();    }