title: Unable to compile JSP, Exception: org.apache.jasper.JasperException
body: <p>I am getting the below error because of line <code>System.out.println(sendURL.substring(0, sendURL.lastIndexOf("/")));</code> sendURL is not null, it has value in it. Anyone please help me to reslve this. Thanks in advance!</p>
  
  <p><strong>Message</strong></p>
  
  <blockquote>
    <p>description The server encountered an internal error () that prevented it from fulfilling this request.</p>
  </blockquote>
  
  <p><strong>Exception</strong></p>
  
  <pre><code>org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/authenticate.jsp at line 47
  
  44:     config = getServletConfig(); 
  45:     String localStoreurl=application.getInitParameter("localstorefile"); 
  46:     String domain=application.getInitParameter("domain");
  47:     System.out.println(sendURL.substring(0, sendURL.lastIndexOf("/")));
  48: %&gt;
  49: &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  50:     &lt;head&gt;
  
  
  Stacktrace:     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:519)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:428)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   root cause java.lang.NullPointerException
      org.apache.jsp.jsp.authenticate_jsp._jspService(authenticate_jsp.java:103)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   note The full stack trace of the root cause is available in the Apache Tomcat/6.0.30 logs.
  </code></pre>
  
  <p>Apache Tomcat/6.0.30</p>