You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Igal Sapir <is...@apache.org> on 2019/12/24 08:17:25 UTC

Jasper throws an NPE when running in IntelliJ IDEA

I have set up Tomcat in IntelliJ using the ant task, `ant ide-intellij`.  I
added the PATH variables for ANT_HOME and TOMCAT_BUILD_LIBS, and marked the
directory webapps/examples/WEB-INF/classes as a Source Folder.

If I call the URI for /tomcat.gif, for example, it works as expected and I
get the image, but if I try to run /index.jsp I get the NPE below [1].

Further, when I check the IDE for implementations of the abstract class
org.apache.jasper.runtime.HttpJspBase I can't find any, which is very
puzzling to me.

What am I doing wrong?

Thanks,

Igal

[1]
org.apache.jasper.JasperException: java.lang.NullPointerException
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:639)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:515)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

*Root Cause*

java.lang.NullPointerException
	org.apache.jsp.index_jsp._jspService(index_jsp.java:431)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:477)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)