我在有login.jsp进入主界面是出现了异常;异常代码如下:typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.ex...
我在有login.jsp进入主界面是出现了异常;异常代码如下:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NullPointerException
org.apache.jsp.gzgl.reg_jsp._jspService(reg_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs.
请各位大哥帮忙看看是什么毛病啊?
下面是reg.jsp中的部分代码:我的hr_yh数据表中没yh这个选项,大家帮忙分析一下String sql="select * from hr_yh where yh='"+user+"' or name='"+user+"'";这行代码有什么作用;
user=request.getParameter("user");
password=request.getParameter("password");
String sql="select * from hr_yh where yh='"+user+"' or name='"+user+"'";
ResultSet rs=db.execQuery(sql);
if(rs.next())
{
check=rs.getString("password");
check=check.trim();
user=rs.getString("yh");
user=user.trim();
name=rs.getString("name");
name=name.trim();
acl=rs.getString("acl");
acl=acl.trim();
dep=rs.getString("dep");
dep=dep.trim();
展开