Found tens of post about this issus, but it is still not soloved yet....
fileUploadListener method is not fired,
Code: Select all
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
<init-param>
<param-name>thresholdSize</param-name>
<param-value>51200</param-value>
</init-param>
<init-param>
<param-name>uploadDirectory</param-name>
<param-value>/tmp/fileUpload</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
Code: Select all
<p:fileUpload fileUploadListener="#{managedBean.doUpload}" />
Code: Select all
public void doUpload(FileUploadEvent event)
{
System.out.println("#################################");
}
Any help would be appreciated!