title: How to retrieve init parameter in jsp
body: <p>I try to get url data using jsp, for that i used jsp code as</p>
  
  <pre><code>  String Url = pageContext.getServletConfig().getInitParameter("url").toString();
   out.println(Url);  
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;servlet&gt;
  &lt;servlet-name&gt;IploginJSP&lt;/servlet-name&gt;
  &lt;jsp-file&gt;/Iplogin.jsp&lt;/jsp-file&gt;
      &lt;init-param&gt;
      &lt;param-name&gt;url&lt;/param-name&gt;
      &lt;param-value&gt;http://xxx.xxx.xxx.xxx:9000&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;IploginJSP&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/Iplogin&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>But i shows NullPointerException </p>