空指针异常怎么解决
type Exception reportmessage
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
servlet.qiantai.LoanBookServlet.doGet(LoanBookServlet.java:52)
servlet.qiantai.LoanBookServlet.doPost(LoanBookServlet.java:79)
javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.44 logs.
52行代码: sql = "select * from loanbook where users='"+login.get(0)+"' and books='"+bookid+"' and flag='未还书'";
79行代码:doGet(request, response);
这个问题怎么解决