Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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