e.printStackTrace();
    public ActionForward prepareInsertSummary(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixServiceException,            FenixFilterException {        HttpSession session = request.getSession(false);        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        Integer objectCode = getObjectCode(request);        request.setAttribute("objectCode", objectCode);        processAnotherDate(request, form);        boolean loggedIsResponsible = false;        List responsibleTeachers = null;        Object argsReadResponsibleTeachers[] = { objectCode };        try {            responsibleTeachers = (List) ServiceManagerServiceFactory.executeService(userView,                    "ReadTeachersByExecutionCourseResponsibility", argsReadResponsibleTeachers);            for (Iterator iter = responsibleTeachers.iterator(); iter.hasNext();) {                InfoTeacher infoTeacher = (InfoTeacher) iter.next();                if (infoTeacher.getInfoPerson().getUsername().equals(userView.getUtilizador())) {                    loggedIsResponsible = true;                    break;                }            }            request.setAttribute("loggedIsResponsible", new Boolean(loggedIsResponsible));            if (!loggedIsResponsible) {                InfoTeacher infoTeacher = (InfoTeacher) ServiceManagerServiceFactory.executeService(                        userView, "ReadTeacherByUsername", new Object[] { userView.getUtilizador() });                InfoProfessorship infoProfessorship = (InfoProfessorship) ServiceManagerServiceFactory                        .executeService(userView, "ReadProfessorshipByTeacherIDandExecutionCourseID",                                new Object[] { infoTeacher.getIdInternal(), objectCode });                request.setAttribute("loggedTeacherProfessorship", infoProfessorship.getIdInternal());            }        } catch (Exception e) {            ActionErrors errors = new ActionErrors();            errors.add("error", new ActionError("Can't find course's responsible teacher"));            saveErrors(request, errors);            return showSummaries(mapping, form, request, response);        }        Object args[] = { objectCode, userView.getUtilizador() /* userLogged */};        SiteView siteView = null;        try {            siteView = (SiteView) ServiceManagerServiceFactory.executeService(userView,                    "PrepareInsertSummary", args);        } catch (Exception e) {            ActionErrors errors = new ActionErrors();            errors.add("error", new ActionError("error.summary.impossible.insert"));            saveErrors(request, errors);            return showSummaries(mapping, form, request, response);        }        if (siteView == null) {            ActionErrors errors = new ActionErrors();            errors.add("error", new ActionError("error.summary.impossible.insert"));            saveErrors(request, errors);            return showSummaries(mapping, form, request, response);        }        try {            final InfoSiteSummaries infoSiteSummaries = (InfoSiteSummaries) ((ExecutionCourseSiteView) siteView)                    .getComponent();            for (final InfoShift infoShift : (List<InfoShift>) infoSiteSummaries.getInfoShifts()) {                Collections.sort(infoShift.getInfoLessons());            }            Collections.sort(infoSiteSummaries.getInfoShifts(), new BeanComparator("lessons"));            choosenShift(request, infoSiteSummaries.getInfoShifts());            choosenLesson(request, (InfoSummary) request.getAttribute("summaryToInsert"));            preSelectTeacherLogged(request, form, (InfoSiteSummaries) siteView.getComponent());        } catch (Exception e) {            return showSummaries(mapping, form, request, response);        }        DynaActionForm actionForm = (DynaActionForm) form;        if (actionForm.get("summaryDateInputOption").equals("on"))            request.setAttribute("checked", "");        htmlEditorConfigurations(request, actionForm);        request.setAttribute("siteView", siteView);        return mapping.findForward("insertSummary");    }