struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter A. Pilgrim" <pet...@xenonsoft.demon.co.uk>
Subject Re: ActionForwards, et al (was SuccessAction)
Date Wed, 13 Aug 2003 06:48:57 GMT
Craig R. McClanahan wrote:
> On Tue, 12 Aug 2003, Peter A. Pilgrim wrote:
> 
> 
>>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();
> 
> 
> If we're talking about a Struts2 world (where we're willing to reconsider
> the calling sequence of an Action anyway), wouldn't it be better to make
> StrutsWebContext just extend WebContext instead of ServletWebContext?
> That way we could have transparent support for servlets and portlets.
> 
So instead you would make convenience method from WebContext instead
I see the `WebContext.getRequestScope()' returns a mutable map of
attribute values. In other words they are derived from
`ServletRequest.getAttributeNames()'.

But looking at the current Struts 1.1 library would you for compatibility
reason also supply the `HttpServletRequest' object to Struts users?

HttpServletRequest  = StrutsWebContext.getRequest(); // convenience method

and like wise `HttpServletResponse' object?

> 
>>>Another import idea is that, if we wanted, we could also add other other
>>>convenience methods to the context without breaking the signature.
>>>
>>
My question above.

>>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.
>>
>>
> 
> 
> Yep ... lots of interesting room for playing around here.  To say nothing
> of the fact that you can compose your own request processor pipeline to
> boot.
> 

Moving swiftly back to the original design reason. The [old] request processor
is now effectively a `Chain' isn't it?

( ... I will now continue this note at work )

-- 
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: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message