Prettyfaces with multipart form data

Splash Forums PrettyFaces Users Prettyfaces with multipart form data

This topic contains 1 reply, has 2 voices, and was last updated by  Christian Kaltepoth 11 hours, 25 minutes ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27529

    tlizambri
    Participant

    I had an issue that haunted me for several days. I got it to work, but I wanted to know if the solution I put in place was the right solution.

    I have a JSF application that is using prettyfaces 3.3.3 on jboss AS7. All of my pages are coded as .xhtml and I am using prettyfaces to make the URLs like “http://mydomain.com/account&#8221; instead of “http://mydomain.com/account.xhtml&#8221;. My web.xml file simply passes all *.xhtml to my servlet with a single <url-pattern>*.xhtml</url-pattern>. THe problem ocurred when I wanted to add a “fileupload” feature to the application that uses <h:fileInput> and multipart form data. My new page to handle this feature was coded as “fileupload.xhtml” and I added the corresponding prettyfaces config to use URLs like “http://mydomain.com/fileupload&#8221;. However, my application would no longer invoke the servlet until I added an additional <url-pattern>/fileupload/*</url-pattern> to my web.xml.

    This is working, but it doesnt feel right since my web.xml does not need this extra url pattern for all the other navigation around my prettyfaces urls. It is only needed for the page where I added the multipart form.

    Any thoughts as to what I may be doing inefficiently?

    #27530

    This is a bug in AS7 which has been fixed in more recent versions. IIRC this is related to this Undertow issue:

    https://issues.jboss.org/browse/UNDERTOW-251

    However, the workaround you described should work fine.

    BTW: You should really update PrettyFaces 3.3.3 to a more recent version of Rewrite. As you may or may not know, PrettyFaces is not part of Rewrite.

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

You must be logged in to reply to this topic.

Comments are closed.