struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Rodriguez Lopez <alo...@flordeutopia.pt>
Subject ActionContext.getContext().getSession() vs. SessionAware injection (about servlet maps)
Date Thu, 20 May 2010 11:11:00 GMT
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message