There could be another way.
You may probably save the file first with the sessionID in a temp folder. Save the path to the session and use it when the file field is null.
I believe that should work.


Brandon Goodin wrote:
Validate with javascript before the submit. That is the only way. There is
no means to pass the file reference back to the page.

Brandon Goodin
Phase Web and Multimedia
PO Box 85
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-----Original Message----- From: Dan Tran [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 7:09 PM To: Struts Users Mailing List Subject: Re: Advice on File Uplaod


I have the same problem but unable to find solution yet, except to validate as much as I can in the browser side so that I can retain the file field.

-Dan

----- Original Message -----
From: "John Brayton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 12, 2003 5:48 PM
Subject: Advice on File Uplaod



I am somewhat of a Struts newbie, and I could use some advice on
implementing a component of an application.

I have a form that allows a user to upload a file, along with
associated meta-data.  If the form's validate() method returns
ActionErrors, the form will keep the originally entered fields as
default values so that the user can just fix his or her errors and
continue.

Is there a facility to do something similar with a file?  I don't
really want to  have the file transmitted back and forth in the case
of a form validation error, and there does not seem to be a mechanism
in HTML for including an entire file as a default value anyway.  But
I do not want the user to need to re-select the file from the file
system just because one or more of the meta-data fields has a
validation error.

Any thoughts on how to go about this?

Thanks!

John

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



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



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





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



Reply via email to