关于首次访问jsp报错500的问题

   上个星期天用新电脑第一次编写了JSP,但是访问的时候总是报错500,我查了半天,确定代码没有问题。Tomcat的版本也兼容,上百度搜了半天,有很多方法,试了无果,最后看到一个帖子是说是由于Tomcat的lib目录下的ecj.jar这个包的版本太低了,我换了一个高版本的ecj.jar这个包,再次访问,成功了。当jdk是1.8的版本时,还是建议用Tomcat 8.0及以上的版本。

org.apache.jasper.JasperException: An exception occurred processing JSP page /BMS902A2.jsp at line 29 26: { 27: //w_conn = X60getConnection(hkalsip,hkalsdb,hkalslogin,hkalspwd); 28: w_conn = X60getConnection(dgalsip,dgalsdb,dgalslogin,dgalspwd); 29: w_stmt = w_conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE); 30: 31: w_rs = X61executeQuery(w_stmt, "SELECT fa_login FROM ta_user WHERE fa_login='" + p_login + "'"); 32: if (!w_rs.next()) Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:574) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:476) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) com.freestyle.common.servletsupport.RequestFilter.doFilter(RequestFilter.java:36) root cause java.lang.NullPointerException org.apache.jsp.BMS902A2_jsp.createUserForALS(BMS902A2_jsp.java:3287) org.apache.jsp.BMS902A2_jsp._jspService(BMS902A2_jsp.java:4016) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) com.freestyle.common.servletsupport.RequestFilter.doFilter(RequestFilter.java:36) 自己检查后,不清楚哪里错误,请大神帮忙!
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页