<p:fileUpload> PrimeFaces handleFileUpload method not called solution


If you encounter this problem, you need to apply the following steps (2 Steps),

First of all, the following jars must be downloaded as they are required by the Primefaces fileupload component,

commons-fileupload (latest version) http://commons.apache.org/fileupload/
commons-io (latest version) http://commons.apache.org/io/download_io.cgi

Also the following filter should be defined inside web.xml file;

<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>