How to access application scope variable in Struts Action Class

  • Follow


Hi ,
  I am building one application where I have to store some of the
common information in the application scope of the web application.
Now Can anybody tell me how to access those variables in the Action
class of the struts.
When we store the things in the action scope it means it is in the
servletcontext object. I ddin't find any way of accessing it in the
Action class. If anybody knows this then I will be really thankfull to
him. I am little new to struts framework.
Thanks in advance.
0
Reply nitin_phuria 7/27/2004 10:39:57 AM

"Nitin" <nitin_phuria@yahoo.com> wrote in message
news:a67cd9e1.0407270239.248dd507@posting.google.com...
> Hi ,
>   I am building one application where I have to store some of the
> common information in the application scope of the web application.
> Now Can anybody tell me how to access those variables in the Action
> class of the struts.
> When we store the things in the action scope it means it is in the
> servletcontext object. I ddin't find any way of accessing it in the
> Action class. If anybody knows this then I will be really thankfull to
> him. I am little new to struts framework.
> Thanks in advance.

In your action: ServletContext ctx = getServlet().getServletContext()


0
Reply parps8737 (58) 7/27/2004 10:49:16 AM


1 Replies
59 Views

(page loaded in 0.037 seconds)


Reply: