DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38613>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38613

           Summary: Multipart Command Implementation
           Product: Struts
           Version: 1.3.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Action
        AssignedTo: dev@struts.apache.org
        ReportedBy: [EMAIL PROTECTED]


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.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to