On Sat, 14 Dec 2002, Pete Serafin wrote:
> Date: Sat, 14 Dec 2002 00:58:26 -0600
> From: Pete Serafin <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Finding app context in action class???
>
> Its been a while since Ive had to write code to access the application
> context from a struts action class and I have forgotten how to do so.
> Can anyone give point me in the right direction as to how to do this?
>
To retrieve an application scope variable under key "foo" inside an
Action:
String foo = (String)
getServlet().getServletContext().getAttribute("foo");
Craig
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>