> > How do you get session A information available to session B without persisting it 
>somehow (the HttpSessionContext interface is depracated in Java Servlet API v2.1for 
>security reasons...)?
(snip)
> >
> 
> Use servlet context attributes to share information between all the
> sessions in your webapp.

Thanks for the info.  I knew there had to be something in the servlet scope, but 
didn't know quite where to find it.  The following works in any of our classes that 
extend Action:

servlet.getServletContext().setAttribute( "myAttribute", myAttribute );

and likewise

MyAttribute myAttribute = (MyAttribute)servlet.getServletContext().getAttribute( 
"myAttribute" );

I noticed that:
- "servlet" is declared a protected "transient" ActionServlet in ActionServletWrapper, 
- ActionForm has the getter method for the wrapper,
- RequestUtils.populate() calls the getter,
- ActionServlet calls RequestUtils.populate()

What I don't follow is how the servlet object is exposed in the Action subclasses.



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

Reply via email to