I have a method XYZ(org.apache.struts.upload.FormFile file) and a method ABC(java.io.File f). I want to convert file of type java.io.File into struts FormFile, so that I can invoke the method XYZ(FormFile file) within the method ABC(java.io.File f).
I want to convert file of type java.io.File into struts FormFile, so that I can invoke the method XYZ(FormFile file) within the method ABC(java.io.File f).
You cant convert the io.File object to that of type Struts FormFile, because they altogether two different things, there is no relation between them ,,
Can you modify your existing method parameters , like you can take another parameter of Struts FormFile in ABC method, as