File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Problem with  t:inputFileUpload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with  t:inputFileUpload" Watch "Problem with  t:inputFileUpload" New topic

Problem with t:inputFileUpload

kkk sivam

Joined: Sep 04, 2008
Posts: 1
My form contains other components that require validation and
several fileUpload components. If there is a validation error after
submitting the form, the file path is lost in all fileUpload components
and I have to browse again to specify the files to upload. Is there a
way to keep this from happening.

Thanks in advance,
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
No, the HTML specification already prohibits that (prefilling of the input type="file" element). So JSF can't do much for you here.

This is prohibited by the HTML specification to prevent clients from eventual malicious websites which prefills an input type="file" element with for example "c:/user/passwords.txt" and automatically submits the form on load using Javascript.
I agree. Here's the link:
subject: Problem with t:inputFileUpload
It's not a secret anymore!