On Wed, Mar 19, 2008 at 5:19 AM, udaykumar <[EMAIL PROTECTED]> wrote: > > I am using struts and have an upload.jsp and its associated UploadForm.java > and UploadAction.java. The jsp's form has an enctype=multipart/form-data and > contains an html:file field to upload a file as well as a bunch of text > fields for metadata associated with the file. If an error occurs during > validation, the struts controller servlet forwards to the jsp with error > messages. The problem is that the filepath the user specified is no longer > present. Is there a way to restore this value so the user doesn't have to > complete this field again (the other text fields remain filled in). Thanks > in advance
The issue is that inputs of type file are read-only to unsigned javascript programs and of course the value attribute does not apply. Otherwise, a page could try to hide a file input on a form with a preset value of /etc/shadow or some other sensitive file, and have a user unknowingly upload this file. -Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]