title: getServletContext().getAttribute() returning null?
body: <p>When trying to set Context attributes like so:</p>
  
  <pre><code>void init()
  {
      String testing = new String();
      testing = "This is a test";
      getServletContext().setAttribute("test", testing);
  }
  </code></pre>
  
  <p>In one servlet, and getting the attribute like so:</p>
  
  <pre><code>String testing = (String) getServletContext().getAttribute("test")
  </code></pre>
  
  <p>In a second servlet, <code>testing</code> is <code>null</code>.</p>
  
  <p>Does this mean my servlets are in separate contexts?  If so, how could I access the context attributes of the first servlet?  Please provide a reference for this as I am relatively new to java/servlets.</p>
  
  <p>I am using Netbeans with Glassfish 3.</p>
  
  <p>EDIT:  They are both in the same webapp and are both defined in the same WEB-INF/web.xml</p>