Peter A. Pilgrim wrote: > If the interface was supposed to be environment free what would > this interface be?
Have a look at the abstract WebContext in the Craig's new Chain of Responsibility package.
http://jakarta.apache.org/builds/jakarta-commons/nightly/commons-chain/
So, the ActionContext interface *might* start with the WebContext members and then add some convenience methods for retrieving the ActionMapping and ActionForm.
MyActionForm form = (MyActionForm) context.getActionForm();
The idea being that at runtime Struts could be passing around a ServletActionContext or a PortletActionContext, or a generic ActionContext (implemented with HashMaps) that you populated yourself as part of an automatic test.
Right.
So we could have convenience methods such as
StrutsWebContext scontext = (StrutsWebContext)context; // Where ``StrutsWebContext'' is a type of ``ServletWebContext''
ActionForm form = scontext.getActionForm(); ActionMapping mapping = scontext.getActionMapping();
Another import idea is that, if we wanted, we could also add other other convenience methods to the context without breaking the signature.
And presumably we [as application developer] will be able to subclass the ServletWebContext and add application features like Single Sign-On / Security / personalisation etcetera. We will be able to configure Struts Module to use our custom `Context' instead of the Struts default context.
Yep this is looking sexy.
-- Peter Pilgrim __ _____ _____ _____ / //__ // ___// ___/ + Serverside Java / /___/ // /__ / /__ + Struts / // ___// ___// ___/ + Expresso Committer __/ // /__ / /__ / /__ + Independent Contractor /___//____//____//____/ + Intrinsic Motivation On Line Resume || \\===> `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]