final IUserView userView = getUserView(request);  final Integer shiftId = Integer.valueOf(request.getParameter("shiftId")); if(!StringUtils.isEmpty(request.getParameter("executionCourseID"))) { request.setAttribute("executionCourseID", request.getParameter("executionCourseID")); }
final IUserView userView = getUserView(request);
    public ActionForward execute(ActionMapping mapping, ActionForm actionForm,            HttpServletRequest request, HttpServletResponse response) throws FenixFilterException {        final IUserView userView = getUserView(request);                final Integer shiftId = Integer.valueOf(request.getParameter("shiftId"));        if(!StringUtils.isEmpty(request.getParameter("executionCourseID"))) {                        request.setAttribute("executionCourseID", request.getParameter("executionCourseID"));        }                try {            ShiftEnrollmentErrorReport errorReport = (ShiftEnrollmentErrorReport) ServiceUtils					.executeService(userView, "EnrollStudentInShifts", new Object[] {							getStudent(userView), shiftId });            if (errorReport.getUnAvailableShifts().size() > 0) {            	for (final Shift shift : (List<Shift>) errorReport.getUnAvailableShifts()) {            	    addActionMessage(request, "error.shift.enrollment.capacityExceded", shift.getNome());            	}            }            if (errorReport.getUnExistingShifts().size() > 0) {            	addActionMessage(request, "error.shift.enrollment.nonExistingShift");            }        } catch (StudentNotFoundServiceException e) {            e.printStackTrace();            addActionMessage(request, "error.shift.enrollment.nonExistingStudent");            return mapping.getInputForward();                    } catch (FenixServiceException e) {            e.printStackTrace();            addActionMessage(request, e.getMessage());            return mapping.getInputForward();        }        saveMessages(request);        return mapping.findForward("enrollmentConfirmation");    }