if (request.getParameter("degree") != "") {
if (selectedDegreeAbbrev== null) {
    public ActionForward enrollCourses(ActionMapping mapping,				       ActionForm form,				       HttpServletRequest request,				       HttpServletResponse response)        throws Exception {	        HttpSession session = request.getSession();        IUserView userView = (IUserView)session.getAttribute(SessionConstants.U_VIEW);        // retrieve the student information to fill the info         // to be passed to the readShifts service        InfoStudent infoStudent = null;        infoStudent =            (InfoStudent)ServiceUtils.executeService(						     userView,						     "ReadStudentByUsername",						     new Object[] { userView.getUtilizador()});		// Retrieve the current executionYear to later get the existing degrees	InfoExecutionYear currentExecutionYear = 	    (InfoExecutionYear)ServiceUtils.executeService(userView,"ReadCurrentExecutionYear",new Object[]{});		// Retrieve the list of existing degrees	List degreeList =  	    (List)ServiceUtils.executeService(userView,"ReadExecutionDegreesByExecutionYear",new Object[]{currentExecutionYear});		// get the student's own course to show first, if there is not one	// already selected	String selectedDegreeAbbrev = request.getParameter("degree");	InfoExecutionDegree selectedDegree = null, idtemp = null ;		// if there is no selected degree	if (request.getParameter("degree") != "") {	    // retrieve the student's own curricular plan	    selectedDegreeAbbrev = ((InfoDegree)ServiceUtils.executeService(userView,"ReadCourseByStudent",new Object[]{infoStudent.getNumber(),infoStudent.getDegreeType()})).getSigla();	}	Iterator i = degreeList.iterator();	// we assume that the Abbrev ( sigla ) is unique amongst the degrees	while (i.hasNext()){	    idtemp = (InfoExecutionDegree) i.next();	    if(idtemp.getInfoDegreeCurricularPlan().getInfoDegree().getSigla() == selectedDegreeAbbrev){		selectedDegree = idtemp;		i.remove();	    }	}	if (selectedDegree == null) {	    // didn't found the degree, doesn't exist. someone did a boo boo	    throw new FenixActionException("Wrong Degree Selected. Please enroll in another college.");	} // end of if ()		// add to the beginning of the list the selected degree	degreeList.add(0, selectedDegree);	request.setAttribute("degreeList",degreeList);		InfoExecutionPeriod currentExecutionPeriod = (InfoExecutionPeriod) ServiceUtils.executeService(userView,												    "ReadCurrentExecutionPeriod",												    new Object[]{});		// retrieve all courses pertaining to the selected degree	ArrayList infoExecutionCourses = new ArrayList();	for (int  j = 1; j < 6; j++) {	    infoExecutionCourses.addAll( 					(List) ServiceUtils.executeService(userView,									   "SelectExecutionCourse",									   new Object[]{selectedDegree,currentExecutionPeriod,new Integer(j)}));	    	} 	request.setAttribute("courseList",infoExecutionCourses);	// and finally retrieve all courses the student is currently enrolled in	List attendingCourses = (List) ServiceUtils.executeService(userView,								   "ReadDisciplinesByStudent",								   new Object[]{infoStudent.getNumber(),infoStudent.getDegreeType()});		System.out.println(request.getParameter("wantedCourse"));	request.setAttribute("wantedCourse",attendingCourses);			return mapping.findForward("selectCourses");    }