• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

could not setThe value in html:file

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you specify enctype="multipart/form-data" in your html:form tag? If not, that's the problem.
 
This one time, at bandcamp, I had relations with a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic