I have added primeFaces fileUpload in my code and it worked fine on webLogic 12.2 server But when I changed the server to wildFly 10.0.1 the fileUpload Listener does not invoked anymore I wondered what is the reason and searched for this issue without avail.
That is the filters in 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>
And that is my xhtml code
<p:column headerText="#{msgs.label_uploadFile}" >
<p:fileUpload id="upload" label="#{msgs.label_uploadFile}"
fileUploadListener="#{attachmentsInquiryBean.handleFileUpload}"
mode="advanced" auto="true"/>
</p:column>
That is the Listener function
public void handleFileUpload(FileUploadEvent event) {
// do something
}
Also I added two jars in my wWEB-INF/lib folder called:
commons-fileupload-1.3.jar
commons-io-2.4.jar