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 ..

1) Include shale jars

2) create chain-config.xml

<catalogs>

  <!-- Define preprocessing command chain for Shale to execute -->
  <catalog               name="shale">
    <!-- Disallow direct access to JSP and JSFP resources -->
    <chain               name="preprocess">
<command className="org.apache.shale.application.ContextRelativePathFilter"

includes="\S*\.faces,\S*\.html,\S*\.gif,\S*\.jpg,/index\.jsp"
                     excludes="\S*\.jsp,\S*\.jspf"/>
    </chain>
  </catalog>

...
</catalogs>

3) we would provide a ContextRelativePathFilter class (Is this just a standard class implementing Filter?)


Another dumb question since I'm new to using this chain of command set up... If I wanted other Filters to fire in the preprocess based on other include/exclude pattern matching, would I just include another command right beneath (using this example above) the ContextRelativePathFilter command? If so, does the chain break as soon as the first pattern match is found and that filter executes or does it continue to try to match the patterns in other commands?

Thanks


--
Rick

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

Reply via email to