if (session != null) { InfoExecutionPeriod infoExecutionPeriod = (InfoExecutionPeriod) request.getAttribute( SessionConstants.EXECUTION_PERIOD);
InfoExecutionPeriod infoExecutionPeriod = (InfoExecutionPeriod) request.getAttribute(SessionConstants.EXECUTION_PERIOD);
	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);		if (session != null) {			InfoExecutionPeriod infoExecutionPeriod =				(InfoExecutionPeriod) request.getAttribute(					SessionConstants.EXECUTION_PERIOD);			Integer semestre = infoExecutionPeriod.getSemester();			Integer anoCurricular =				(Integer) escolherContextoForm.get("curYear");			Integer index =				new Integer((String) escolherContextoForm.get("index"));			request.setAttribute("curYear", anoCurricular);			request.setAttribute("semester", semestre);			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());			if (infoExecutionDegree == null) {				return mapping.findForward("Licenciatura execucao inexistente");			}			RequestUtils.setExecutionDegreeToRequest(				request,				infoExecutionDegree);			String nextPage =				(String) session.getAttribute(SessionConstants.NEXT_PAGE);			if (nextPage != null)				return mapping.findForward(nextPage);			else				// TODO : throw a proper exception				throw new FenixActionException("SomeOne is messing around with the links");		} else			throw new FenixActionException();		// nao ocorre... pedido passa pelo filtro Autorizacao	}