This *would* be possible using cookies and javascript if you could 
set the value of an <input type="file"> element, but this is against 
the rules of the html-spec, so no go.

I'm sure there is a way to workaround it, like setting the filepath 
as a cookie and then rendering an <input type="text"> - but then the 
user will not be able to re-select a file.

--- In [EMAIL PROTECTED], Hans-Joachim Matheus <[EMAIL PROTECTED]> 
wrote:
> Hi Christoph
> 
> Von: Rooms, Christoph [mailto:CRooms@S...]
> > I have a html:file tag in my form.
> > 
> > The user selects a file, press submit ... And because of 
> > validation errors
> > he will see the form to re-edit it. BUT the file field is empty. 
> > 
> 
> There is no workaround. The local file path ("c:\temp\foo")
> which you see in the file dialog in the browser is not submitted
> to the server but only the filename ("foo").
> 
> You cannot return this value ("foo") from the server to the client,
> because something like <input type="file" value="foo"> would point 
to the
> wrong
> local file location.
> 
> It is completely normal behavior that you see an empty file-input-
field
> when struts comes back with some validation errors.
> This is sometimes annoying for the user. But that is as it is.
> 
> Hans-Joachim Matheus
> 
> -- 
> mailto:Hans-Joachim.Matheus@i... \
> in-integrierte informationssysteme GmbH \
> Am Seerhein 8     Tel +49 (0)7531/8145-0 \
> D-78467 Konstanz                  Fax -81 \
> -------------------->http://www.in-gmbh.de \
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@j...>
> For additional commands, e-mail: <mailto:struts-user-help@j...>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to