title: Can we call getServletContext() inside contextInialized method?
body: <p>Creating servlet that implements <code>contextInitializer</code> interface in this code, </p>
  
  <p>then accessing file inside <code>contextinitialized()</code> using  this line</p>
  
  <pre><code>InputStream input = getServletContext().getResourceAsStream("/WEB-INF/file.properties"));
  </code></pre>
  
  <p>this exception occurred</p>
  
  <pre><code>java.lang.NullPointerException         at      
      javax.servlet.GenericServlet.getServletContext(GenericServlet.java:160)
  </code></pre>
  
  <p>any ideas ?</p>