| Author |
servlet context in struts Action class
|
Anand Gondhiya
Ranch Hand
Joined: Feb 24, 2004
Posts: 155
|
|
Hello All, in my struts-EJB application , I want to crate some application variables. For that I have to use servlet context right ? How do I use servlet context in Struts Action classes ?? If this info is not enough , please let me know ..I will give more details.. thanks -Anand.
|
 |
Karthik Guru
Ranch Hand
Joined: Mar 06, 2001
Posts: 1209
|
|
did you try this in your aciton class: getServlet().getServletContext()
|
 |
somkiat puisungnoen
Ranch Hand
Joined: Jul 04, 2003
Posts: 1312
|
|
you can config in web.xml like this :: How to use ServletContext context = ....; context.getAttribute("TEST1");
|
SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
|
 |
Anand Gondhiya
Ranch Hand
Joined: Feb 24, 2004
Posts: 155
|
|
I used Servlet.getServletContext()......It works fine...now Thanks all
|
 |
 |
|
|
subject: servlet context in struts Action class
|
|
|