I'm pretty sure you can't prepopulate input tags whose type=file.
This is html4 and has nothing to do with struts.


-----Original Message-----
From: Greg Lindholm [mailto:glindh...@yahoo.com] 
Sent: Wednesday, March 18, 2009 4:17 PM
To: user@struts.apache.org
Subject: Re: File upload, validation and Preparable


BTW That's Struts 2.1.6 and Tomcat 5.5.


Greg Lindholm wrote:
> 
> Got a couple questions about file uploading.
> 
> I've discovered that in the standard interceptor stack "fileUpload" is
> after "prepare" interceptor. This means that the upload File, ContentType,
> and FileName setters have not been called before prepare() method runs. 
> Is there a good reason for this?  It seems like fileUpload should be
> before prepare so that these "parameters" have been set and are available
> to the prepare() method. What do you think?
> 
> One of the problems I'm having is that if the page fails validation (on
> some other field) then the user selection in the <s:file> tag is lost. 
> The result="input" takes me back to the page but the File selection is
> blank.  Is there a way to preserve the users file selection when
> validation fails? 
> 
> If I do a show source on the page after validation fails the input file
> tag has it's value= attribute set the temp file name from the server. This
> doesn't seem right?  This is leaking server configuration (albeit not very
> important)  information back to the client.
> 
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/File-upload%2C-validation-and-Preparable-tp22587156p22587594.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or
MSD and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and
then delete it from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to