Greg Lindholm wrote:
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?
That's why the "paramsPrepareParams" stack exists.
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?
No; you can't pre-set file input values--as David said this is an HTML thing, not Struts.
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.
That's probably true. Dave --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org