struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject [OT RANT] Re: multiple FileUpload Problem
Date Sun, 14 Jun 2009 19:32:24 GMT
Martin Gainty wrote:
> [200 lines of config, JSP, Java, and JavaDocs]

We should strive for clarity when helping people. When questions are 
prompted by lack of documentation specificity it's even *more* crucial.

Needlessly verbose responses obfuscate the essence of answers, and 
present a cognitive overhead disproportionate to those answers.

In this case, the issue was a simple misunderstanding on the OP's part. 
IMO pointing out the misunderstanding is sufficient: it's concise, 
direct, and entails essentially zero effort to explain, and, even more 
importantly, to comprehend.

Here we were confronted with a wall of configuration and code, each 
"chunk" of which must be parsed for potential meaning. I question the 
efficacy of this approach, and here's why:

> WEB-INF/classes/struts.xml contains the inclusion of struts-fileupload.xml as illustrated
here
> <include file="struts-fileupload.xml" />
 > [elided]

Given that we have web-accessible source code, perhaps simple references 
would suffice. Including ancillary source seems gratuitous--particularly 
since none of the code addresses the original question directly.

> //$STRUTS2_HOME/apps/struts2-showcase-2.1.2/fileupload/upload-success.jsp
 > [elided]

This page shows the action properties of the form we've submitted a 
single file to. It isn't related to the OP's question at all. The 
original question had to do with uploading multiple files and why (in 
the OP's view) the files "had" to be named "upload".

So far none of the included code has addressed the original question, 
but we must still take the time to *know* that it doesn't address the 
original question.

> //$STRUTS2_HOME/apps/struts2-showcase-2.1.2/fileupload/multipleUploadUsingList.jsp
 > [elided]

This section of code is related to the question, but simply repeats the 
information available on the documentation page to which (I've assumed) 
the OP has referred.

It is *precisely* this information that mislead the OP in the first 
place. Re-presenting this information reinforces the original misconception.

> /* $Id: MultipleFileUploadUsingListAction.java 478625 2006-11-23 17:31:52Z wsmoak $
 > [elided]

This is the code for the multiple-file upload action. The comments I've 
made regarding the JSP apply equally here: this code fragment reinforces 
an unwarranted assumption.

> //if you want a more overt mechanism to identify which file you
 > will be processing you can use the status.index illustrated

While this is true, it does not address the core issue: we do *not* have 
to use a collection of files. We can simply create multiple File action 
properties (and their associated file information properties).

Please, please, *please* try to (a) answer the question asked, and (b) 
do so as clearly as possible.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message