wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with  t:inputFileUpload" Watch "Problem with  t:inputFileUpload" New topic
Author

Problem with t:inputFileUpload

kkk sivam
Greenhorn

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,
kksb
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: http://aspose.com/file-tools
 
subject: Problem with t:inputFileUpload
 
Similar Threads
How to use javascript in Struts
how to clear the values of components on validation errors in JSF
JSP Upload
How to upload a file along with form data to a database using servlet
How To Fetch a File ( .doc, .txt, .pdf, ..., etc.) From Client's Machine