if (infoExecutionDegree != null) { CurricularYearAndSemesterAndInfoExecutionDegree cYSiED = new CurricularYearAndSemesterAndInfoExecutionDegree( anoCurricular, semestre, infoExecutionDegree); session.setAttribute(SessionConstants.CONTEXT_KEY, cYSiED);  session.setAttribute( SessionConstants.CURRICULAR_YEAR_KEY, anoCurricular); session.setAttribute( SessionConstants.INFO_EXECUTION_DEGREE_KEY, infoExecutionDegree);  } else { return mapping.findForward("Licenciatura execucao inexistente"); }  String nextPage = (String) session.getAttribute(SessionConstants.NEXT_PAGE); if (nextPage != null) return mapping.findForward(nextPage); else  throw new Exception("SomeOne is messing around with the links"); } else throw new Exception();
	public ActionForward nextPage(		ActionMapping mapping,		ActionForm form,		HttpServletRequest request,		HttpServletResponse response)		throws Exception {			HttpSession session = request.getSession(false);			DynaActionForm escolherContextoForm = (DynaActionForm) form;			SessionUtils.removeAttributtes(				session,				SessionConstants.CONTEXT_PREFIX);			if (session != null) {				/* :FIXME: get semestre with executionPeriod */				Integer semestre = new Integer(2); 							//(Integer) escolherContextoForm.get("semestre");				Integer anoCurricular =					(Integer) escolherContextoForm.get("curricularYear");				int index = Integer.parseInt((String)escolherContextoForm.get("index"));				session.setAttribute("anoCurricular", anoCurricular);				session.setAttribute("semestre", semestre);				List infoExecutionDegreeList = (List) session.getAttribute(SessionConstants.INFO_EXECUTION_DEGREE_LIST_KEY);							InfoExecutionDegree infoExecutionDegree = (InfoExecutionDegree) infoExecutionDegreeList.get(index);							if (infoExecutionDegree != null) {					CurricularYearAndSemesterAndInfoExecutionDegree cYSiED =						new CurricularYearAndSemesterAndInfoExecutionDegree(							anoCurricular,							semestre,							infoExecutionDegree);					session.setAttribute(SessionConstants.CONTEXT_KEY, cYSiED);									session.setAttribute(SessionConstants.CURRICULAR_YEAR_KEY, anoCurricular);					session.setAttribute(SessionConstants.INFO_EXECUTION_DEGREE_KEY, infoExecutionDegree);				} else {					return mapping.findForward("Licenciatura execucao inexistente");				}				String nextPage = (String) session.getAttribute(SessionConstants.NEXT_PAGE);				if (nextPage != null)					return mapping.findForward(nextPage);				else					// TODO : throw a proper exception					throw new Exception("SomeOne is messing around with the links");			} else				throw new Exception();			// nao ocorre... pedido passa pelo filtro Autorizacao			}