Search code examples
jsffile-uploadglassfishjsf-2.2prettyfaces

File upload via h:inputfile (prettyfaces) does not work


I'm trying to upload a file to the glassfish application server (v4.1) via h:inputfile. xhtml-file and bean are prepared as almost every example in the web shows.

I tried with and without Pretty Filter in web.xml, allowCasualMultipartParsing in context.xml, and a handful of other possible workarounds. None of them seemed to work (i.e. I can't read the file properties inside the bean).

Is there a solution that works 100%?


Solution

  • Found a sufficient solution, was posted here on stackoverflow.com before: Fileupload and PrettyFaces and JSF 2.2

    Not pretty, but it works.