Michael,

have a look at the fileupload.jsp in the examples. The value of the inputFileUpload component is bound to #{fileUploadForm.upFile} where fileUploadForm is an instance of org.apache.myfaces.examples.misc.FileUploadForm defined as a managed bean. After submitting the form the upFile property of named bean will hold an instance of UploadedFile which you can use to obtain an InputStream to read the contents of the uploaded file and write it to whatever location you like.

Oliver

Michael Wiedmann wrote:

I had a look at x:inputFileUpload but cannot figure out how to handle the once
uploaded file. I tried to follow "examples/web/fileupload.jsp" and
"examples/misc/FileUploadForm.java". It looks like the uploaded file is located
in the configured temp. space ("uploadRepositoryPath" in web.xml)

How do I transfer this to the final location (I build the pathname for the final
location for myself)?

The documentation of Jakarta commons fileUpload mentions code like:

.. FileItem item = ...;
..
item.write(uploadedFile);


All what I am missing is how to get this "FileItem".

Michael




--
Oliver Rossmueller
Software Engineer and IT-Consultant
Hamburg, Germany
http://www.rossmueller.com



Reply via email to