File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert File object to Formfile object

 
venkatesh warlu
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am having a file object. I need to convert it into FormFile object. It shows classcastexception when try to type cast it. Please help.

File reqFile = new File("file.txt");
myForm.setReqFile(reqFile);

The setReqFile is a private Formfile variable in my form like "private FormFile reqFile;"

Thanks in advance!!

Regards
Venkat
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic