HttpSession session = request.getSession(true);
HttpSession session = request.getSession(false);
    public ActionForward nextPagePublic(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException {        HttpSession session = request.getSession(true);        DynaActionForm escolherContextoForm = (DynaActionForm) form;        SessionUtils.removeAttributtes(session, SessionConstants.CONTEXT_PREFIX);        InfoExecutionPeriod infoExecutionPeriod = (InfoExecutionPeriod) request                .getAttribute(SessionConstants.EXECUTION_PERIOD);        Integer semestre = infoExecutionPeriod.getSemester();        Integer anoCurricular = (Integer) escolherContextoForm.get("curYear");        Integer degreeCurricularPlanId = getFromRequest("degreeCurricularPlanID", request);        request.setAttribute("degreeCurricularPlanID", degreeCurricularPlanId);        Integer degreeId = getFromRequest("degreeID", request);        request.setAttribute("degreeID", degreeId);        Integer index = new Integer((String) escolherContextoForm.get("index"));        request.setAttribute("curYear", anoCurricular);        request.setAttribute("semester", semestre);        request.setAttribute("index", index);        Object argsLerLicenciaturas[] = { infoExecutionPeriod.getInfoExecutionYear() };        List infoExecutionDegreeList;        try {            infoExecutionDegreeList = (List) ServiceUtils.executeService(null,                    "ReadExecutionDegreesByExecutionYear", argsLerLicenciaturas);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        Collections.sort(infoExecutionDegreeList, new ComparatorByNameForInfoExecutionDegree());        /*         * InfoExecutionDegree infoExecutionDegree = (InfoExecutionDegree)         * infoExecutionDegreeList .get(index.intValue());         */        InfoExecutionDegree infoExecutionDegree = new InfoExecutionDegree();        Iterator iterator = infoExecutionDegreeList.iterator();        while (iterator.hasNext()) {            infoExecutionDegree = (InfoExecutionDegree) iterator.next();            if (infoExecutionDegree.getInfoDegreeCurricularPlan().getIdInternal().equals(                    degreeCurricularPlanId)) {                request.setAttribute(SessionConstants.EXECUTION_DEGREE, infoExecutionDegree);                request                        .setAttribute("executionDegreeID", infoExecutionDegree.getIdInternal()                                .toString());                request.setAttribute("infoDegreeCurricularPlan", infoExecutionDegree);                break;            }        }        if (infoExecutionDegree == null) {            return mapping.findForward("Licenciatura execucao inexistente");        }        RequestUtils.setExecutionDegreeToRequest(request, infoExecutionDegree);        String nextPage = request.getParameter("nextPage");        if (nextPage != null) {            return mapping.findForward(nextPage);        }        // TODO : throw a proper exception        throw new FenixActionException("SomeOne is messing around with the links");    }