struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Lindholm <>
Subject Re: ActionContext.getContext().getSession() vs. SessionAware injection (about servlet maps)
Date Thu, 20 May 2010 14:18:18 GMT
Writing unit tests are significantly easier when you have dependencies
injected with the xxxAware Interfaces.

On Thu, May 20, 2010 at 7:11 AM, Alex Rodriguez Lopez
<> wrote:
> Hi Struts users!
> I was wondering, after reading about the ServletConfigInterceptor, if there
> are differences in obtaining the session map via the method
> ActionContext.getContext().getSession() or have it injected through
> SessionAware.
> The map that I end up with is the same so... why have to implement any thing
> at all when it is easily obtainabe through
> ActionContext.getContext().getSession()?
> Same goes for application map...
> But obtaining the request map is confusing me a little bit. Through
> ActionContext I can only get a map of request parameters, the request
> attributes I can only get through requestAware injection. Wouldn't it be
> nice to have a method in ActionContext.getContext() to return a map of both
> request parameters and attributes? Does it make sense or am I missing
> something?
> Any comments on this doubts? Can someone elaborate a little bit on this
> subject or point out to references explaining this?
> Regards!
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message