The truth is, it's that way now because that's how it was when I found
Stripes. It just isn't something I've thought much about. I, personally,
prefer Commons FileUpload so I have no objection to making it the default
for some future release.

-Ben

On Sat, Jan 8, 2011 at 9:29 AM, Marcus Kraßmann <[email protected]> wrote:

>  Hi Devs,
>
> reading this, I wonder why Stripes is by default delivered with COS instead
> of Commons Fileupload. Any good reason to stay with COS and its exceptional
> license for Stripes?
>
> Regards,
> Marcus
>
> Am 07.01.2011 21:57, schrieb Ben Gunter:
>
> Glad you got it worked out :)
>
>  For the record, as of Stripes 1.5 you don't actually have to configure
> the MultipartWrapper.Class parameter unless you have both COS and FileUpload
> on the classpath at the same time. If you only have one or the other,
> Stripes will choose the correct one at startup.
>
>  -Ben
>
> On Fri, Jan 7, 2011 at 3:38 PM, derrickaw <[email protected]> wrote:
>
>>
>>
>> Hi Ben-
>>
>> Thanks for the help - it was right on the money!
>>
>> As it happened I was using COS, and replaced it with the
>> commons-fileupload-1.2.2 library, and put the following parameters in the
>> Stripes Filter clause in WEB.XML:
>>
>>  <init-param>
>>            <param-name>MultipartWrapper.Class</param-name>
>>
>>
>> <param-value>net.sourceforge.stripes.controller.multipart.CommonsMultipartWrapper</param-value>
>> </init-param>
>>
>>
>> It solved the 'multi-upload with the same file' with the linux server. The
>> only bad part was it made me a bit antsy to switch a library I don't know
>> a
>> whole lot about on our servers, but so far I can't detect any differences
>> in
>> behavior (other than solving the above problem). I'm just being a
>> worry-wart
>> because our business runs on the application, and any way I've requested
>> QA
>> to hammer on file uploads before we deploy, but at this point everything
>> looks great.
>>
>> Thanks again and truly appreciate it!
>>
>> -Derrick
>>
>>
>>
>>
>> Ben Gunter-2 wrote:
>> >
>> > Are you using COS or Commons FileUpload? Whichever it is, you might try
>> > switching to the other one to see if it exhibits the same problem.
>> >
>> > -Ben
>> >
>> > On Fri, Jan 7, 2011 at 1:26 PM, derrickaw <[email protected]>
>> wrote:
>> >
>> >>
>> >>
>> >> I found an interesting platform problem with Stripes multi file uploads
>> >> on
>> >> Windows vs. Linux. I used the below document to implement multi-file
>> >> uploads.
>> >>
>> >> http://www.stripesframework.org/display/stripes/File+Uploads
>> >>
>> >> Using an index set of file uploads, such as:
>> >>
>> >> <stripes:file id="file_upload[0]" name="file_upload[0]" />
>> >> <stripes:file id="file_upload[1]" name="file_upload[1]" />
>> >>
>> >>
>> >> On both Windows (Windows 7) and Linux (Redhat Enterprise 5.5), the code
>> >> works perfectly, but with one specific exception:
>> >>
>> >> On Linux, if the user uploads the exact same file for two or more
>> >> "file_upload[x]" (the same file from his hard drive, such as
>> >> c:\pictures\kittens_and_yarn.jpg for each upload), file_upload[n] is
>> >> processed without a problem, but file_upload[m] and onwards gets a
>> "file
>> >> not
>> >> found" exception for that one specific identical file upload.
>> >>
>> >>
>> >> On Windows, every file_upload[x] is processed perfectly.
>> >>
>> >>
>> >> My guess is what's going on is the underlying system is handling
>> >> temporary
>> >> files differently. I think Windows is creating a separate temporary
>> file
>> >> for
>> >> each upload, while Linux is creating temporary filenames that is being
>> >> overwritten with each subsequent file_upload[x] with an identical
>> >> filename,
>> >> and deleting/moving the single temporary file the first time it's
>> >> processed.
>> >>
>> >>
>> >> It's likely not a Stripes problem and Stripes probably has no control
>> >> over
>> >> how these temporary files work on different platforms, but it was
>> causing
>> >> a
>> >> "yes it works / no it doesn't" argument with QA for a few days before I
>> >> thought maybe I should check how it's working on the QA environment. QA
>> >> and
>> >> production runs on Linux, the developers are stuck with Windows (I
>> know,
>> >> I
>> >> know). Anyway I hope this helps some other developer who runs into this
>> >> problem.
>> >>
>> >> I'm not really sure how to handle this, so I'm thinking that probably
>> >> what
>> >> I
>> >> will do is capture the filename/filepath of everything being uploaded,
>> >> and
>> >> if any of them are identical, to process that file input stream exactly
>> >> once, and provide copies of this single file when requested. If someone
>> >> has
>> >> a better way I'd be very glad to hear how you handled this.
>> >>
>> >> Thanks again!
>> >>
>> >> -Derrick
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Karl Kirch wrote:
>> >> >
>> >> > Yep it was another js issue. Ajax file uploads are tricky.
>> >> >
>> >> > Karl
>> >> >
>> >> > On Fri, May 14, 2010 at 3:52 PM, Karl Kirch
>> >> > <[email protected]>wrote:
>> >> >
>> >> >>
>> >> >> Stripes 1.5.3
>> >> >> jQuery Form Plugin to submit the form
>> >> >>
>> >> >>
>> >> >> Figured out the first question. Can't return json back to an iframe
>> >> >> (which
>> >> >> is what was making the response blank). I suppose I should read the
>> >> >> jquery
>> >> >> Form plugin documentation a bit closer :p
>> >> >>
>> >> >> Still having issues with the multiple file upload, but I suppose
>> this
>> >> >> could
>> >> >> be another js issue. I'll keep you posted.
>> >> >>
>> >> >> Karl
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Fri, May 14, 2010 at 3:03 PM, Aaron Porter <[email protected]>
>> >> wrote:
>> >> >>
>> >> >>>  Karl,
>> >> >>> Can you give some details on your setup? Stripes version, upload
>> >> >>> library,
>> >> >>> etc.
>> >> >>>
>> >> >>> I've never any problem like what you're describing.
>> >> >>>
>> >> >>> Aaron
>> >> >>>
>> >> >>>
>> >> >>> On 05/14/2010 01:01 PM, Karl Kirch wrote:
>> >> >>>
>> >> >>> On a side note, I can't get the multiple file upload example to
>> work
>> >> >>> either. The list of FileBeans is always null.
>> >> >>>
>> >> >>> On Fri, May 14, 2010 at 1:26 PM, Karl Kirch
>> >> >>> <[email protected]>wrote:
>> >> >>>
>> >> >>>> Also, if I remove the file upload field from the form it works (I
>> >> get
>> >> a
>> >> >>>> filled response). But even if I don't add a file to the upload
>> field
>> >> it
>> >> >>>> fails
>> >> >>>>
>> >> >>>>  Karl
>> >> >>>>
>> >> >>>>
>> >> >>>> On Fri, May 14, 2010 at 1:03 PM, Karl Kirch
>> >> >>>> <[email protected]>wrote:
>> >> >>>>
>> >> >>>>> I'm having issues with file uploads. I've followed the example at
>> >> >>>>> http://www.stripesframework.org/display/stripes/File+Uploads but
>> I
>> >> >>>>> keep running into weird issues.
>> >> >>>>>
>> >> >>>>> The main issue that I'm having right now is that I get the file
>> in
>> >> the
>> >> >>>>> action bean, but once I forward my resolution back, I get an
>> empty
>> >> >>>>> response back at the browser. I've stepped through the code into
>> >> the
>> >> >>>>> jsp files that I have and all of the data is there in the jsp.
>> >> Theres
>> >> >>>>> no error thrown and it returns a 200 OK response code. Yet theres
>> >> >>>>> still no html/data coming back from the response.
>> >> >>>>>
>> >> >>>>> Any ideas?
>> >> >>>>>
>
>
> ------------------------------------------------------------------------------
> Gaining the trust of online customers is vital for the success of any company
> that requires sensitive data to be transmitted over the Web.   Learn how to
> best implement a security strategy that keeps consumers' information secure
> and instills the confidence they need to proceed with 
> transactions.http://p.sf.net/sfu/oracle-sfdevnl
>
>
> _______________________________________________
> Stripes-users mailing 
> [email protected]https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
>
>
> ------------------------------------------------------------------------------
> Gaining the trust of online customers is vital for the success of any
> company
> that requires sensitive data to be transmitted over the Web.   Learn how to
> best implement a security strategy that keeps consumers' information secure
> and instills the confidence they need to proceed with transactions.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Stripes-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-development
>
>
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to