PrimeFaces on Tomcat - problems

Components, Ajax Framework, Utilities and More.
Post Reply
Posts: 52
Joined: 12 Dec 2010, 22:19

20 Jan 2011, 00:15


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:

Code: Select all

        <p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}" allowTypes="*.docx" label="Upload"  />
My ManagedBean:

Code: Select all

public class FileUploadMBean {


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

Nothing happens.

No errors or exceptions are generated.
Even changing

Code: Select all

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
Joined: 07 Apr 2010, 16:05

20 Jan 2011, 06:34

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


Code: Select all

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

Posts: 52
Joined: 12 Dec 2010, 22:19

25 Jan 2011, 13: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.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Baidu [Spider] and 10 guests