Board index JavaServer Faces General PrimeFaces on Tomcat - problems

PrimeFaces on Tomcat - problems

Components, Ajax Framework, Utilities and More.

Post 20 Jan 2011, 00:15

Posts: 52

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:

standard.jar (JSTL)

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:
        <p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}" allowTypes="*.docx" label="Upload"  />

My ManagedBean:

public class FileUploadMBean {


       public void handleFileUpload(FileUploadEvent event) {
           String file = event.getFile().getFileName();


Nothing happens.

No errors or exceptions are generated.
Even changing
to a random non-existing function does not generate any errors.

Am I missing something?
Visit for a free, no need to register, .doc to .pdf and .pdf to .doc file conversion.

Posts: 365
This filter (below) is required in your deployment descriptor, and watch
out for any conflicting java code containing @WebFilter annotations,
which can be a real pain to debug.

(clearly changes will and may be needed to the exact text included here...)


        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>

Posts: 52

That worked. Thanks.

I had completely forgotten about that filter.

Visit for a free, no need to register, .doc to .pdf and .pdf to .doc file conversion.

Return to General