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” instead of “http://mydomain.com/account.xhtml”. 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”. 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?