Trying to use this lib to handle file uploading in my Struts app - has anyone else got this to work?
Reason I ask is the request object that get's passed to the Action "execute" method should be of type "MultipartWrapper" but actually it's "MultipartRequestWrapper"!
Will this work with Struts Action's & how do you get to the uploaded file? or do you have to use a servlet instead of an Action?
This is damm hard work!
Joined: Feb 15, 2005
Struts has it's own file upload helpers. If you just define a property of your form bean as type org.apache.struts.upload.FormFile with the same property name used in your <html:file> tag, Struts will automatically map the uploaded file to an instance of this class. There is an example of a file upload in the struts-examples.war file that comes with the Struts download. If you study it, you'll see how it's done.
Once you have a FormFile instance, you can use it's methods to read or write the uploaded file.