This is another example: 
http://svn.apache.org/viewcvs.cgi/struts/shale/trunk/clayplugin/src/java/org/apache/shale/clay/faces/ClayViewHandlerCommand.java?view=markup

The only requirement is that the command's implement the Command interface.  
The common chains is a pretty sweet idea 
(http://jakarta.apache.org/commons/chain/).  It's a utility/pattern that can be 
used in any tier of an application.  The Struts 1.3 request processor has been 
re-tooled to use chains (I wish I could get my employer to move from Struts 1.1 
:--)  

If a Command implementation returns "true" from the execute method, the chain 
is stopped.  You will need to consider that when deciding what order the 
"preprocess" commands should be ordered.

Gary   




--- Begin Message ---
Rick Reumann <[EMAIL PROTECTED]> wrote on 09/09/2005 12:36:39 PM:

> Craig McClanahan wrote the following on 9/9/2005 12:18 PM:
> 
> > For Shale in particular, the "application controller" part of Shale is 

> > implemented as a Commons Chain chain (similar in spirit to what's 
going on 
> > with Struts 1.3's request processor), so you can also implement a 
> check like 
> > this as one of the commands that gets executed on every request. To 
set up 
> > such commands, simply configure a chain named "preprocess" in catalog 
> > "shale" and it will get executed for you on every request.
> 
> Is there a particular example that demonstrates this in the shale 
> examples. I see the chain-config.xml listed so would the set up for our 
> apps just need to ..
> 
> 
> 3) we would provide a ContextRelativePathFilter class (Is this just a 
> standard class implementing Filter?)
> 

Rick, here's where you can see the src for this class:
struts-shale-core-library\src\java\org\apache\shale\application
So ContextRelativePathFilter extends AbstractRegExpFilter which implements 
org.apache.commons.chain.Command ..which i nothing about.... (sigh..)

Geeta

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

Reply via email to