FYI: I got this all updated in WebWork 2.0 and it works with the
ServletDispatcher and FilterDispatcher (Jason did most of it, I just
corrected a small typo).

-Pat

----- Original Message -----
From: "Jason Carreira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 27, 2003 4:55 PM
Subject: [OS-webwork] Xwork configuration update


> I've checked in some new Xwork configuration code. Here's the test
> xwork.xml file:
>
> <xwork>
>     <package name="default">
>         <result-types>
>             <result-type name="chain"
> class="com.opensymphony.xwork.ActionChainResult"/>
>         </result-types>
>
>         <interceptors>
>             <interceptor name="timer"
> class="com.opensymphony.xwork.interceptor.TimerInterceptor"/>
>             <interceptor name="logger"
> class="com.opensymphony.xwork.interceptor.LoggingInterceptor"/>
>             <interceptor name="chain"
> class="com.opensymphony.xwork.interceptor.ChainingInterceptor"/>
>             <interceptor name="params"
> class="com.opensymphony.xwork.interceptor.ParametersInterceptor"/>
>             <interceptor name="static-params"
> class="com.opensymphony.xwork.interceptor.StaticParametersInterceptor"/>
>             <interceptor name="component"
> class="com.opensymphony.xwork.interceptor.component.ComponentInterceptor
> "/>
>             <interceptor name="result"
> class="com.opensymphony.xwork.interceptor.ResultInterceptor"/>
>             <interceptor name="stack"
> class="com.opensymphony.xwork.interceptor.StackInterceptor"/>
>
>             <interceptor-stack name="defaultStack">
>                 <interceptor-ref name="result"/>
>                 <interceptor-ref name="static-params"/>
>                 <interceptor-ref name="params"/>
>                 <interceptor-ref name="stack"/>
>             </interceptor-stack>
>
>             <interceptor-stack name="debugStack">
>                 <interceptor-ref name="timer"/>
>                 <interceptor-ref name="logger"/>
>             </interceptor-stack>
>         </interceptors>
>
>         <action name="Foo" class="com.opensymphony.xwork.SimpleAction">
>             <action-params>
>                 <param name="foo">17</param>
>                 <param name="bar">23</param>
>             </action-params>
>             <result name="success" type="chain">
>                 <param name="actionName">Bar</param>
>             </result>
>             <interceptor-ref name="debugStack"/>
>             <interceptor-ref name="defaultStack"/>
>         </action>
>     </package>
>
>     <package name="bar" extends="default" namespace="/foo/bar">
>         <interceptors>
>             <interceptor-stack name="barDefaultStack">
>                 <interceptor-ref name="debugStack"/>
>                 <interceptor-ref name="defaultStack"/>
>             </interceptor-stack>
>         </interceptors>
>
>         <action name="Bar" class="com.opensymphony.xwork.SimpleAction">
>             <interceptor-ref name="barDefaultStack"/>
>         </action>
>     </package>
> </xwork>
>
> Here you can see that I've implemented Rickard's ideas (see
> http://www.opensymphony.com:8668/space/RickardXWorkThoughts).
>
> 1) Packages - All configuration settings are in a package. Result types,
> interceptors, and actions are all package context specific, no more
> global settings (unless you have a "default" package and have your other
> packages extend it). Result, Interceptor, and Action configurations are
> inherited by packages which "extend" another package, such as package
> "bar" above, which extends "default".
>
> 2) Interceptor stacks - Make it easier to have sets of interceptors you
> apply together in a certain order. These are also inherited as part of
> the interceptor definition inheritance. Essentially these are just name
> mappings to lists of interceptors instead of one Interceptor.
>
> 3)Namespaces - a new idea of mine, this allows actions to be aliased
> with the same name, providing they are in different namespaces. With the
> ServletDispatcher, this equates to the path before the action name,
> which will allow for J2EE declarative security. Namespaces are optional
> attributes of package definitions and, if excluded, defaults to "". If
> the action configuration is not found with the supplied namespace, the
> "" namespace is checked as the default namespace, which makes it work
> like we have now (any path works, you get the action aliased with the
> name).
>
> Check out the code in the sandbox in CVS.
>
> Jason
>
> --
> Jason Carreira
> Technical Architect, Notiva Corp.
> phone: 585.240.2793
>   fax: 585.272.8118
> email: [EMAIL PROTECTED]
> ---
> Notiva - optimizing trade relationships (tm)
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld
http://www.vasoftware.com
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to