- Posted by: pratap sinha
- Posted on: December 10 2004 05:46 EST
I have set some object in an initialization servlet using context.setAttribute() method. and I want to use that object in rest of the servlet. How can I acheive this..
So, wat I need is a kind of relationship between Context and request object.
Is this possible
yourServlet.getServletConfig().getServletContext() Do not forget to synchronize, this is a shared object.
Unless all you're doing is reading it from the initialization on. Then you don't have to synchronize it.