You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by vinicius <vi...@fcdl-rs.com.br> on 2006/08/25 20:40:05 UTC

Saving a bean in a specific context!!

I know how to save a bean in the session context, doinh this:
	request.getSession().setAttribute("beanName",Object);

But i don't find how I save a bean in the Aplicattion or page context!!

Could someone help me??

Thanks

-- 
At.:
Vinicius Dittgen
Analista Programador - T.I.
www.fcdl-rs.com.br
(51) 3213 - 1777

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


Re: Saving a bean in a specific context!!

Posted by Puneet Lakhina <pu...@gmail.com>.
On 8/26/06, vinicius <vi...@fcdl-rs.com.br> wrote:
>
> I know how to save a bean in the session context, doinh this:
>         request.getSession().setAttribute("beanName",Object);
>
> But i don't find how I save a bean in the Aplicattion or page context!!
>
> Could someone help me??
>
> Thanks
>
> Application Context:

request.getSession().getServletContext().setAttribute("name",obj);

as for page context, i suppose you should be setting page context things in
the page only, which is trivial using <bean:define> tag
-- 
Puneet

Re: Saving a bean in a specific context!!

Posted by Michael Jouravlev <jm...@gmail.com>.
On 8/25/06, vinicius <vi...@fcdl-rs.com.br> wrote:
> I know how to save a bean in the session context, doinh this:
>         request.getSession().setAttribute("beanName",Object);
>
> But i don't find how I save a bean in the Aplicattion or page context!!
>
> Could someone help me??

Google surely can help to find an appropriate chapter in J2EE blueprints:
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html#1079198

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