Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change 
notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/ComposableRequestProcessor

------------------------------------------------------------------------------
+ For Struts 1.3, the RequestProcessor methods has been turned into Commands. 
Rather than subclassing a monolithic object, it is possible not just to replace 
Commands. It is also possible to insert or remove Commands, if needed, to 
extend or streamline the request processing gauntlet.
+ 
+ The RequestProcessor class has been turned into ComposableRequestProcessor 
that invokes Command in the proper order. This order is defined with standard 
{{{chain-config.xml}}} file buried deep in Struts library, but can be easily 
overriden with custom config file if needed. To do this one need to define 
"chainConfig" property for !ActionServlet in {{{web.xml}}} file. This propertly 
should contain comma-separated list of either context-relative or classloader 
path(s) to load commons-chain catalog definitions from.  If none specified, the 
default Struts catalog that is provided with Struts will be used.
+ 
+ inline:struts_chain.gif
+ 
+ === todo ===
+ 
  Beginning with Struts 1.3.0, the original RequestProcessor class has been 
extended in a way that substantially overhauls the way in which a Struts module 
processes an HTTP Request.  Before this version of Struts, the RequestProcessor 
class implemented a variation of the Template pattern, in that it articulated a 
primary "process" method which called various protected methods in a reliable 
order.  Users who wanted to alter the request processing lifecycle were advised 
to extend RequestProcessor and override one or more of those methods.
  
  This led to a very inflexible environment, where it was very difficult to 
synthesize a request processing chain from library code, because of the 
familiar problems with "single inheritance" in Java.  With the introduction of 
the ComposableRequestProcessor class, every request is handed to a composable 
chain of commands, each of which can perform a small bit of the request 
processing.  
@@ -16, +24 @@

  Other notes on the ComposableRequestProcessor are welcomed!
  
  ----
- Ted Husted made a pretty good case for a composable chain of processors on 
the mailing list.  For now, just a pointer: 
http://marc.theaimsgroup.com/?l=struts-dev&m=105472470724762&w=2
+ Ted Husted made a pretty good case for a composable chain of processors on 
the mailing list. 
http://marc.theaimsgroup.com/?l=struts-dev&m=105472470724762&w=2
  
+ Other links:
+ 
+ http://www.onjava.com/pub/a/onjava/2005/03/02/commonchains.html
+ 
+ http://www.onjava.com/pub/a/onjava/2005/03/02/commonchains2.html
+ 
+ http://www.infonoia.com/en/content.jsp?d=inf.05.06&pr=1
+ 

Reply via email to