I am using Primefaces 5.2, jsf 2.2 and Tomcat 8 on a Linux server. This is the line in my xhtml:
<p:fileUpload fileUploadListener="#{uploadController.complete}" multiple="true"/>
The method in the class UploadController:
public void complete(FileUploadEvent fileUploadEvent) {
UploadedFile item = fileUploadEvent.getFile();
// ... etc. nothing special, all standard reading
}
If I start up my page in a jetty, everything works fine.
But if I start it up on the linux server with tomcat 8, i got
javax.el.ELException Property 'complete' not found on type
exception. I also tried to run my code on my Windows machine in a tomcat 8 (started up by Maven in a cargo container). No problem there.
One step further was to put a parameter for method UploadController.complete :
<p:fileUpload fileUploadListener="#{uploadController.complete(fileUploadEvent)}" multiple="true"/>
...the only way a parameter was excepted (no f:param , f:attribute,... were accepted => same ELException). But then the event "fileUploadEvent" in UploadController is NULL.
How to solve the problem?