actionMessages.add("fileRequired", new ActionMessage("errors.required", "Nome do Docente"));
actionMessages.add("", new ActionMessage("errors.required", "Nome do Docente"));
    public ActionForward insertNonAffiliatedTeacher(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws FenixFilterException,            FenixServiceException, NonExistingActionException {        IUserView userView = SessionUtils.getUserView(request);        DynaActionForm dynaForm = (DynaActionForm) form;        Integer institutionID = (Integer) dynaForm.get("institutionID");        String nonAffiliatedTeacherNameToInsert = (String) dynaForm                .get("nonAffiliatedTeacherNameToInsert");                if(nonAffiliatedTeacherNameToInsert == null || nonAffiliatedTeacherNameToInsert.equals("")){            ActionMessages actionMessages = new ActionMessages();            actionMessages.add("fileRequired", new ActionMessage("errors.required", "Nome do Docente"));            saveMessages(request, actionMessages);            return mapping.getInputForward();        }                Object[] args = { nonAffiliatedTeacherNameToInsert, institutionID };        ServiceUtils.executeService(userView, "InsertNonAffiliatedTeacher", args);        if (request.getAttribute("insertInstitution") != null) {            request.setAttribute("insertInstitution", "true");        }        List institutions = null;        try {            institutions = (List) ServiceUtils.executeService(userView, "ReadInstitutions", null);        } catch (NonExistingServiceException ex) {            throw new NonExistingActionException(ex.getMessage(), mapping                    .findForward("insertProfessorShip"));        }        request.setAttribute("institutions", institutions);        return mapping.findForward("insertProfessorShip");            }