if (infoGuide.getGuideRequester().equals(GuideRequester.STUDENT.name())) {
if (infoGuide.getGuideRequester().equals(GuideRequester.STUDENT)) {
    public ActionForward print(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 number = new Integer(request.getParameter("number"));            Integer year = new Integer(request.getParameter("year"));            Integer version = new Integer(request.getParameter("version"));            session.removeAttribute(SessionConstants.MASTER_DEGREE_CANDIDATE);            Integer numberRequester = null;            if (request.getParameter(SessionConstants.REQUESTER_NUMBER) != null) {                numberRequester = new Integer(request.getParameter(SessionConstants.REQUESTER_NUMBER));                request.setAttribute(SessionConstants.REQUESTER_NUMBER, numberRequester);            }            InfoGuide infoGuide = null;            try {                Object args[] = { number, year, version };                infoGuide = (InfoGuide) ServiceManagerServiceFactory.executeService(userView,                        "ChooseGuide", args);            } catch (FenixServiceException e) {                throw new FenixActionException();            }            if (infoGuide.getGuideRequester().equals(GuideRequester.STUDENT.name())) {                InfoStudent infoStudent = null;                List infoStudents = null;                Object args2[] = { infoGuide.getInfoPerson() };                try {                    infoStudents = (List) ServiceUtils.executeService(userView, "ReadStudentsByPerson",                            args2);                    Iterator it = infoStudents.iterator();                    while (it.hasNext()) {                        infoStudent = (InfoStudent) it.next();                        if (infoStudent.getDegreeType().equals(DegreeType.MASTER_DEGREE))                            break;                    }                    request.setAttribute(SessionConstants.STUDENT, infoStudent.getNumber());                } catch (FenixServiceException e) {                    throw new FenixActionException();                }            } else {                request.setAttribute(SessionConstants.STUDENT, numberRequester);            }            Locale locale = new Locale("pt", "PT");            String formatedDate = "Lisboa, "                    + DateFormat.getDateInstance(DateFormat.LONG, locale).format(                            infoGuide.getCreationDate());            session.setAttribute(SessionConstants.DATE, formatedDate);            session.setAttribute(SessionConstants.GUIDE, infoGuide);            String copies = request.getParameter("copies");            if (copies != null && copies.equals("2")) {                return mapping.findForward("PrintTwoGuides");            }            return mapping.findForward("PrintOneGuide");        }        throw new Exception();    }