File upload component under prettyfaces mapped url doesn't upload anything

Splash Forums PrettyFaces Users File upload component under prettyfaces mapped url doesn't upload anything

This topic contains 6 replies, has 3 voices, and was last updated by  giates 7 years, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #26359



    inserting fileupload component (PrimeFaces5) that perfectly uploads files in a non mapped url (ex. /index.xhtml) it doesn’t upload anything if used in a prettyfaces mapped url (ex. /test), no javascript errors, no server side errors, simply not upload anything…

    I’ve write a test that shows the problem in a JEE7 maven very simple application, you can clone the project using:

    git clone

    Can anyone help me to understand where is the problem ?

    This happens on Glassfish 4 with latest mojarra library, primefaces 5 and rewrite-servlet/rewrite-integration-faces/rewrite-config-prettyfaces 2.0.12.Final

    Notice that I must use PrettyFaces (can’t use rewrite module only because I must load some specific data using url parameters before page rendering…)

    Many thanks in advance…


    Hey. Could you check if the workaround from here helps:

    See the “Why are file uploads not working correctly any more?” section.



    I’ve tried but no luck, same problem…

    I’ve updated my test application at:

    Now I’ve refactored the test application dropping prettyfaces annotations and inserting rewrite configuration provider, but the problem is still there, as soon as I’m using a rewrited url fileUpload doesn’t upload anything, when the same component is used without url rewriting it correctly upload the files…

    • This reply was modified 7 years, 4 months ago by  giates.


    guys, your forum is broken.

    ones cannot create topics anymore because form validation doesn’t let you. It’s always saying that the Topic must be not empty, when it is actually not empty.



    Any news about the issue ?

    Seems that the problem appears only when I’m using rewrite module…

    Notice that I’ve just tested the test application (see posts above) on Glassfish v. 4.1 and the problem is still there…



    I think < and > don’t work well in forum topics any may cause this error. Could you check that?


    I don’t know about any workarounds for this issue which work on Glassfish. Sorry.

    As described in the FAQ, there is really no way for Rewrite to work around this issue. Rewrite has to use methods like HttpServletRequest.getParameter() which breaks multipart requests in some containers.

    AFAIK the Tomcat workaround doesn’t work in Glassfish (although Glassfish uses Tomcat internally, right?). Wildfly in the newest version should work. Older versions have to be patched.

    One thing that COULD work in Glassfish is to create a rule that basically prevents that other Rewrite rules are evaluated for the URL that contains the upload component. So you could try to add this in front of all your other rules:

    .when( Direction.isInbound().and( Path.matches( "/somepath/my-upload.jsf" ) ) )
    .perform( Lifecycle.handled() )

    But this means that you have a Join or anything else for this URL.

    It’s just a guess. Perhaps it helps. 🙂



    Hi Christian,

    many thanks for your response.

    I’ve found a solution, if I insert commons file upload dependency to my project and set:

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

    into web.xml I can correctly upload the files using Rewrite module on Glassfish 4.1

    Probably using commons fileupload the request.getParameter of Rewrite module is working good…

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.