Details
Description
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.
Attachments
Attachments
Issue Links
- incorporates
-
STR-2140 Multipart forms processed in reset() method
- Open