You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Puneet Lakhina <pu...@gmail.com> on 2006/10/25 19:10:18 UTC
FormFile field value not getting retained
Hi,
This is the first time I am using a FormFile. I have a few other fields in
my form along with the <html:file> field. The problem is when some
validation fails, the value in the text field of the file control gets lost
i.e. the user has to select the file again. Is this normal behavior or does
it have to do something with the way im doing things.
--
Puneet
Re: FormFile field value not getting retained
Posted by Laurie Harper <la...@holoweb.net>.
Puneet Lakhina wrote:
> Hi,
> This is the first time I am using a FormFile. I have a few other fields in
> my form along with the <html:file> field. The problem is when some
> validation fails, the value in the text field of the file control gets lost
> i.e. the user has to select the file again. Is this normal behavior or does
> it have to do something with the way im doing things.
This is the normal behaviour. A file input can't be pre-populated, hence
there is no way to preserve it's value when the page is re-loaded.
That's a security restriction that browsers impose, to prevent
unscrupulous web sites from getting files from your computer without you
knowing it.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org