Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<html:file> tag?

 
Mallik Avula
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i have a page where user can upload some images. for this i am using <html:file> tag and i am able to upload it into server. Everything is fine for now.
But when the user didn't fill a mandatory item and the page get back with errors, i want to show the file path in that box.
it is not showing the 'value' attribute content in the box.
How can i do it?
Please give some suggestions.

 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, but there's no way that I know of to do this. For security reasons, neither Firefox nor IE allow a server-side value to be defaulted in an <input type="file" > tag (which is what html:file gets rendered as). Think about it. If this were allowed, a malicious site could default the value of your Outlook file with all your names and addresses in it and have JavaScript submit the upload before you were even aware anything was happening.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic