Hi,
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
Please elp
-Pratap
-
ServletContext and ServletRequest problem (2 messages)
- Posted by: pratap sinha
- Posted on: December 10 2004 05:46 EST
Threaded Messages (2)
- ServletContext and ServletRequest problem by Michael Jouravlev on December 10 2004 12:39 EST
- ServletContext and ServletRequest problem by Grim Shieldsson on December 13 2004 14:41 EST
-
ServletContext and ServletRequest problem[ Go to top ]
- Posted by: Michael Jouravlev
- Posted on: December 10 2004 12:39 EST
- in response to pratap sinha
yourServlet.getServletConfig().getServletContext() Do not forget to synchronize, this is a shared object. -
ServletContext and ServletRequest problem[ Go to top ]
- Posted by: Grim Shieldsson
- Posted on: December 13 2004 14:41 EST
- in response to Michael Jouravlev
Unless all you're doing is reading it from the initialization on. Then you don't have to synchronize it.