This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

could not setThe value in html:file

 
sathish kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

I action form has FormFile object which has get and set method. My ActionForm extending by the ValidatorForm.

this the get and set method in my ActionForm

private FormFile theFile;

public FormFile getTheFile() {
return theFile;
}


public void setTheFile(FormFile theFile) {
this.theFile = theFile;
}

what happed was when i select the file and click sumbit button it displays follow error in the browser


java.lang.IllegalArgumentException: Cannot invoke com.form.MyForm.setTheFile - argument type mismatch

eventhough My arument passing all are corret, why displays such error

What is problem in this, guys please help me
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you specify enctype="multipart/form-data" in your html:form tag? If not, that's the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic