How to access application scope variable in Struts Action Class

N

Nitin

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.
 
M

Murray

Nitin said:
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()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top