详细错误:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
work.Loginservlet.doPost(Loginservlet.java:83)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
第 83行周围代码:
try{
if(stmt != null) {
rs = stmt.executeQuery(sql); //返回查询结果
}
}catch(SQLException e) {
e.printStackTrace();
}
try{
if(rs.next())
{
response.sendRedirect("succe.jsp");
}
else
{
response.sendRedirect("fail.jsp");
}
这行为第83行: if(rs.next())
求高手指教T T
------解决方案--------------------
你确定rs不为null?
最好外面来个
if(rs!=null){
你的代码
}
------解决方案--------------------
------解决方案--------------------
------解决方案--------------------
sql语句怎么写的,有参数吗?
代码迷推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.daimami.com/search?q=317