Reputation: 21
I have an object FormFile
recovered through a Struts Form .
I have to convert Java
side in the java.io.File
How can I do? The casting in this way by exception:
File myFile = (File) fileFormFile
Upvotes: 2
Views: 12732
Reputation: 12924
Read the API document of FromFile class what methods it all provides. Use getInputStream() method.
Upvotes: 0
Reputation: 4956
Here, I found something you might use:
http://www.coderanch.com/t/54902/Struts/Struts-FormFile-java-io-File
Upvotes: 2