A blog by a system administrator and programmer.

org.apache.jasper.JasperException: java.lang.NullPointerException 
Monday, August 19, 2013, 09:19 PM - Programming
Posted by Administrator
If your server can startup normally but when you try to access any jsp and the pages show the following exception.

java.lang.NullPointerException org.apache.jsp.index_jsp._jspInit(index_jsp.java:26) org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:164) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:338) 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) com.pahome.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:18) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) com.pahome.filter.CheckLoginFilter.doFilter(CheckLoginFilter.java:173) com.pahome.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:18)


At line 26 it usually show something like this.
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();


It usually means that your WEB-INF contain duplicated jars especially jsp-api.jar and servlet-api.jar. Remove them and restart your server will solve the problem.
8 comments ( 135 views )   |  permalink   |   ( 2.9 / 247 )

| 1 | 2 | Next> Last>>