This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Struts and the fly likes FormFile Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "FormFile" Watch "FormFile" New topic
Author

FormFile

jonathan Greens
Ranch Hand

Joined: Apr 07, 2004
Posts: 139
if I get a FormFile, is there any easy way in struts to write it to the disk?
I know i can use formFile.getFileData() as a byte[] then maybe use java.io. But is there a better way?
thanks
Ray Stojonic
Ranch Hand

Joined: Aug 08, 2003
Posts: 326
as of Struts 1.2 you should be using commons-upload instead
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
there is one method in form file which directly gives u the inputstream rather than reading thorugh bytes
jonathan Greens
Ranch Hand

Joined: Apr 07, 2004
Posts: 139
thanks guys. I am using struts 1.1. i guess it's time to migrate to 1.2
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: FormFile
 
Similar Threads
Yet another upload file question...
Why am I getting IllegalArgumentException
JUnit and multiple classes
file upload in sturts
Multiple File Upload using Struts