我正在上传文件,<t:inputFileUpload
一切正常,但是当文件大于 web.xml 中设置的值时,它不会输出任何错误或警告消息。我的代码:
<h:form id="uploadForm" enctype="multipart/form-data">
<t:inputFileUpload id="fileupload" accept="image/*" storage="file"
value="#{fileUpload.uploadedFile}" styleClass="fileUploadInput"
required="true" validator="epacient.FileUploadValidator" validatorMessage="Napacna vrsta ali prevelika datoteka."/>
<h:message for="fileupload" style="color: red;" />
<br />
<h:commandButton value="Upload" id="fileUploadButton" action="#{fileUpload.upload}" />
<h:message for="uploadForm" style="color: red;" />
</h:form>
如果文件太大,它应该在<h:message
标签上写一个错误,我错了吗?
我该如何解决这个问题?
此致