This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set default value to the struts html:file using javascript

 
Nani Palle
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...

I have some problem is when i click browse button for uploading file,it is displaying some error message(done for some business requirment),when it is displaying error message,the corresponding html:file value should be null,but how to set null value to html:file.

please provide solutions as soon as possible

Thanks
yadavendar
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have a bean which contain a property of type "File" which is mapped to the html:file attribute, In a bean, just initialize the "File" property with "null"and user reset() method of ActionForm to set it 'null'.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic