我想在我的应用程序中使用fileUploadSingle:
然而,当我添加组件时。
<h:form enctype="multipart/form-data">
<p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}"
mode="advanced"
update="messages"
sizeLimit="100000"
allowTypes="/(.|/)(gif|jpe?g|png)$/"/>
<p:growl id="messages" showDetail="true"/>
</h:form>
我正在使用:
<junit-version>4.8.2</junit-version>
<mockito-version>1.9.0</mockito-version>
<dbunit-version>2.2</dbunit-version>
<hibernate-version>4.0.1.Final</hibernate-version>
<hibernate-validator-version>4.2.0.Final</hibernate-validator-version>
<c3p0-version>0.9.1.2</c3p0-version>
<spring-version>3.1.1.RELEASE</spring-version>
<aspectj-version>1.5.4</aspectj-version>
<jsf-version>2.1.3_01</jsf-version>
<primefaces-version>3.0.M1</primefaces-version>
我还在我的应用程序中包含了commons-fileupload
和commons-io
。但是,在我的页面上什么也没有显示
您是否在web.xml中添加了以下代码?
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>