} catch (NotAuthorizedException e) {
} catch (NotAuthorizedFilterException e) {
    public ActionForward prepareToDoTest(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException {        HttpSession session = request.getSession();        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        Integer testCode = null;        try {            testCode = new Integer(request.getParameter("testCode"));        } catch (NumberFormatException e) {            request.setAttribute("invalidTest", new Boolean(true));            return mapping.findForward("testError");        }        List infoStudentTestQuestionList = null;        String path = getServlet().getServletContext().getRealPath("/");        try {            infoStudentTestQuestionList = (List) ServiceUtils.executeService(userView,                    "ReadStudentTestToDo", new Object[] { userView.getUtilizador(), testCode,                            new Boolean(true), path });        } catch (NotAuthorizedException e) {            request.setAttribute("cantDoTest", new Boolean(true));            return mapping.findForward("testError");        } catch (InvalidArgumentsServiceException e) {            request.setAttribute("invalidTest", new Boolean(true));            return mapping.findForward("testError");        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        Collections.sort(infoStudentTestQuestionList);        request.setAttribute("infoStudentTestQuestionList", infoStudentTestQuestionList);        for (int i = 0; i < infoStudentTestQuestionList.size(); i++) {            InfoStudentTestQuestion infoStudentTestQuestion = (InfoStudentTestQuestion) infoStudentTestQuestionList                    .get(i);            if (infoStudentTestQuestion.getQuestion().getQuestionType().getType().intValue() == QuestionType.STR                    && ((ResponseSTR) infoStudentTestQuestion.getResponse()).getResponse() != null)                request.setAttribute("question" + i, ((ResponseSTR) infoStudentTestQuestion                        .getResponse()).getResponse());            else if (infoStudentTestQuestion.getQuestion().getQuestionType().getType().intValue() == QuestionType.NUM                    && ((ResponseNUM) infoStudentTestQuestion.getResponse()).getResponse() != null)                request.setAttribute("question" + i, ((ResponseNUM) infoStudentTestQuestion                        .getResponse()).getResponse());            else if (infoStudentTestQuestion.getQuestion().getQuestionType().getType().intValue() == QuestionType.LID                    && ((ResponseLID) infoStudentTestQuestion.getResponse()).getResponse() != null)                if (infoStudentTestQuestion.getQuestion().getQuestionType().getCardinalityType()                        .getType().intValue() == CardinalityType.SINGLE)                    request.setAttribute("question" + i, ((ResponseLID) infoStudentTestQuestion                            .getResponse()).getResponse()[0]);                else                    request.setAttribute("question" + i, ((ResponseLID) infoStudentTestQuestion                            .getResponse()).getResponse());            //            else if            // (infoStudentTestQuestion.getQuestion().getQuestionType().getType().intValue()            // == QuestionType.LID)            //                request.setAttribute("question" + i, new String[]{new String()});            //            else            //                request.setAttribute("question" + i, new String());        }        request.setAttribute("studentTestForm", form);        request.setAttribute("date", getDate());        return mapping.findForward("doTest");    }