You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/08/12 10:59:18 UTC

[jira] Updated: (STR-2772) Multipart Command Implementation

     [ https://issues.apache.org/struts/browse/STR-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict updated STR-2772:
-------------------------------

    Fix Version/s: 1.4.0
         Assignee:     (was: Struts Developers)
       Issue Type: New Feature  (was: Improvement)

> Multipart Command Implementation
> --------------------------------
>
>                 Key: STR-2772
>                 URL: https://issues.apache.org/struts/browse/STR-2772
>             Project: Struts 1
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 1.3.0
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Niall Pemberton
>            Priority: Minor
>             Fix For: 1.4.0
>
>         Attachments: AbstractMultipartHandler.java, CheckIfMultipartRequest.java, CreateMultipartHandler.java, LookupIgnoreResult.java, struts_multipart_commands.patch, StrutsMultipartHandler.java, WrapMultipartRequest.java
>
>
> I'm proposing that the multipart processing be separated out into a set of 
> Commands in a separate chain:
>   <!-- ========== Mulitpart Processing chain ========== -->
>   <chain name="process-multipart">
>       <!-- Check if the request is a multipart request -->
>       <command className="o.a.s.c.c.servlet.CheckIfMultipartRequest"/>
>       <!-- Create the multipart handler -->
>       <command className="o.a.s.c.c.CreateMultipartHandler"/>
>       <!-- Wrap the multipart request -->
>       <command className="o.a.s.c.c.servlet.WrapMultipartRequest"/>
>       <!-- See if the Struts Multipart Handler can process the request -->
>       <command className="o.a.s.c.c.servlet.StrutsMultipartHandler"/>
>   </chain>
> The main "process-action" chain would be modified to use a LookupCommand that 
> ignores the result of this new "process-multipart" chain. This will allow 
> multiple multipart handlers to be added to the chain, with the one that 
> actually handles the request returning "true" to stop processing of 
> the "process-multipart" chain (but not "process-action" chain).
> This proposal has a number of benefits:
> 1) All mutlipart handling is now in Commands which can easily be configured
> 2) Removed request "wrapping" code from ComposableRequestProcessor - no need to 
> sub-class ComposableRequestProcessor to modify the "wrapping".
> 3) RequestUtils's static populate() method is redundant - all that code is now 
> in commands - making custom multipart (and form population) processing much 
> easier.
> 4) Multiple multipart handlers can be easily configured by simply adding 
> additional commands to the multipart chain.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.