I've been using PrimeFaces 2.2 RC2 on Glassfish 3 with great efficacy. However, now I am using it with Tomcat 6 for another project.
I installed the following libs:
jsf-api.jar
jsf-impl.jar
standard.jar (JSTL)
jstl.jar
I'm just testing with the fileUpload component. It renders correctly and seems to behave correctly at the client side. But then I realize it doesn't call my ManagedBean. In fact it seems to ignore all references to a fileUploadListener altogether.
My .xhtml:
Code: Select all
<h:body>
<h:form>
<p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}" allowTypes="*.docx" label="Upload" />
</h:form>
</h:body>
Code: Select all
@ManagedBean(name="fileUploadController")
@RequestScoped
public class FileUploadMBean {
public void handleFileUpload(FileUploadEvent event) {
String file = event.getFile().getFileName();
System.out.println(event.getFile().getFileName());
}
No errors or exceptions are generated.
Even changing
Code: Select all
fileUploadListener="#{fileUploadController.handleFileUpload}"
Am I missing something?