struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tom tom <j_lal...@yahoo.com>
Subject Re: SessionAware vs ActionContext access to session - confused..
Date Wed, 12 Sep 2007 23:37:17 GMT
Hi,

If you are developing portlets with struts2
I doubt *Aware interfaces work properly, you have to
do it differently.

For example How we get a handler for Http request or
session is not via *Aware interfaces for portlets.

--- j alex <strutstwouser@gmail.com> wrote:

> Hi,
> 
> In the Struts 2 docs, it's recommended to implement
> SessionAware for
> accessing session within Action, but looking at some
> Webwork documentation,
>
http://wiki.opensymphony.com/display/WW1/SessionAware+Actions
>  - it seems to
> convey the opposite message .
> 
> Please clarify :
> 
> 1. Why accessing via ActionContext is not advisable
> ?
> 2. In SessionAware API doc it's said  " Note that
> using this interface makes
> the Action tied to a servlet environment, so it
> should be avoided if
> possible since things like unit testing will become
> more difficult." -- how
> is it tied to servlet env, since we are not having
> any HTTP-specific code in
> the Action but just a plain setSession(Map map)
> method?
> 
> Thanks,
> Joseph
> 



       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get
online.
http://smallbusiness.yahoo.com/webhosting 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message