Try to implement the org.apache.struts2.interceptor.SessionAware
interface. It defines a method called setSession(java.util.Map
session).

[]',s

Diogo

On Thu, Mar 27, 2008 at 10:39 PM, simpi <[EMAIL PROTECTED]> wrote:
>
>  I need to access session scope bean in my java action class which will insert
>  data from all session beans to the Database.
>
>  I know I can access I all session beans in JSP using:
>  <jsp:useBean id="aa" scope="session" class="package.A" />
>
>  How to access this bean in Java Action Class?
>
>  Please Help me !!! :(
>  -----
>  In JSF people do it :
>  FacesContext facesContext = FacesContext.getCurrentInstance();
>  ApplicationFactory appFactory =
>  
> (ApplicationFactory)FactoryFinder.findFactory(FactoryFinder.APPLICATION_FACTORY);
>  Application app = appFactory.getApplication();
>  AppState appState =
>  (AppState)app.getValueBinding("appState").getValue(facesContext);
>  :working:
>  --
>  View this message in context: 
> http://www.nabble.com/How-to-get-access-to-session-scoped-bean-in-Struts--tp16343878p16343878.html
>  Sent from the Struts - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Diogo Dauster Pontual
[EMAIL PROTECTED]
61.81588922

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to