Results 1 to 2 of 2

Thread: Servlet's Context Information

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Answers
    2

    Servlet's Context Information

    How can I get one Servlet's Context Information in another Servlet?


  2. #2
    Junior Member
    Join Date
    May 2007
    Answers
    19

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact