-
Junior Member
Servlet's Context Information
How can I get one Servlet's Context Information in another Servlet?
-
Junior Member
Re: Servlet's Context Information
We can Servlet context information using the ServletContext object . i am writing the code pls go through this.
First SERVLET:
ServletContext sc=getServletContext();
sc.setAttribuer("name","value");//the value may also be an object
Second Servlet:
ServletContext sc=getServletContext();
sc.getAttribute(name); //this will returns the value.
I think this is fine and any problem send message .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules