commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <>
Subject RE: How to set-up setting FormFile Data from a Test Case
Date Fri, 11 Jun 2004 03:38:01 GMT

> -----Original Message-----
> From: Mike Tedesco []
> Sent: Monday, June 07, 2004 8:07 AM
> To:
> Subject: How to set-up setting FormFile Data from a Test Case
> I'd like to create a test case that sets a struts upload FormFile
> with data read from a file, so that it can be read by my
> UploadAction without sending it through HTTP.

You're not really asking in quite the right place, since FormFile is a
Struts interface, and not from Commons FileUpload.

That said, in the Struts code base, you will find two implementations of
FormFile. The one that Struts currently uses is CommonsFormFile, which is an
inner class of CommonsMultipartRequestHandler. There is an obsolete, but not
yet removed, implementation in DiskFile. Either of those should give you a
good idea of how to do what you want. Ultimately, as long as you implement
the FormFile interface one way or another, you should be good to go.

Martin Cooper

> Can someone explain how to do this.
> -- Thanks,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message