How to convert org.apache.myfaces.trinidad.model.UploadedFile to java.io.File in Java?

It’s pretty common to have to convert an org.apache.myfaces.trinidad.model.UploadedFile to a java.io.File when working with an ADF <af:inputFile>.

Working with a java.io.File being the only way to retrieve values from a CSV.

Here is a simple code snippet to do so :


Was this post helpful?

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top