日期:2014-05-20  浏览次数:20806 次

大家好,问一个Servelet在Init时候 报空指针错的问题
各位大哥好,我在维护系统的时候,在起始页面时,会报空指针错
java.lang.NullPointerException
org.apache.jsp.logon_jsp._jspInit(logon_jsp.java:22)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.futuresoft.monitor.platform.dbutil.CharsetFilter.doFilter(CharsetFilter.java:37)

我看了一下生成的临时java文件里第22行为
  public void _jspInit() {
  _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
  _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }

 我怀疑是找不到servletConfig文件了,大家看看是不是啊,另外在哪设置ServletConfig的配置文件啊?

------解决方案--------------------
估计服务器什么的没配置好吧