displayName = getFilenameOnly(formFile.getFileName());
displayName = getFilenameOnly(bean.getFileName());
    public ActionForward fileUpload(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)    		throws Exception {	final Item item = selectItem(request);        final DynaActionForm fileUploadForm = (DynaActionForm) form;        final FormFile formFile = (FormFile) fileUploadForm.get("theFile");        String displayName = fileUploadForm.getString("displayName");        final FileItemPermittedGroupType fileItemPermittedGroupType = FileItemPermittedGroupType.valueOf((String) fileUploadForm.get("fileItemPermittedGroupType"));        final ActionErrors actionErrors = new ActionErrors();        if (displayName == null || displayName.length() == 0 || displayName.trim().length() == 0) {            displayName = getFilenameOnly(formFile.getFileName());        }        if (formFile.getFileName() == null || formFile.getFileName().length() == 0                || formFile.getFileSize() == 0) {            actionErrors.add("fileRequired", new ActionError("errors.fileRequired"));            saveErrors(request, actionErrors);            return mapping.findForward("uploadFile");        }        InputStream formFileInputStream = null;        try {            formFileInputStream = formFile.getInputStream();            final Object[] args = { item.getIdInternal(), formFileInputStream, formFile.getFileName(), displayName, fileItemPermittedGroupType };            executeService(request, "CreateFileItemForItem", args);        } catch (FileManagerException e) {            actionErrors.add("unableToStoreFile", new ActionError("errors.unableToStoreFile", formFile.getFileName()));            saveErrors(request, actionErrors);            return mapping.findForward("uploadFile");        } finally {            if (formFileInputStream != null) {                formFileInputStream.close();            }        }        return mapping.findForward("section");    }