How to get JSF to upload file with Apache Commons FileUpload
问题 I know how to do file upload using Primefaces or using Tomahawk, however, I am trying to doing file upload using Apache Commons FileUpload and so far I am having a bit of road block. Even though my form use multipart/form-data , when I submit my form, the content type become application/x-www-form-urlencoded . Here is my code <h:body> <h:form enctype="multipart/form-data"> Upload File <input type="file" name="file"/> <p:commandButton value="Submit" action="#{viewBean.submit}"/> </h:form> </h