0

i had started tomcat in eclipse and mysql in navicat and run the code the web page was successful but when i request to server it ran into an error called "htttp status 500".Where is the problem in code ?

java.lang.NullPointerException
    com.AI.Dao.AdminDaoimpl.adminLogin(AdminDaoimpl.java:24)
    com.AI.Servlet.AdminServlet.doPost(AdminServlet.java:76)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
L.Katta
  • 1
  • 2
  • 1
    Possible duplicate of [What is a NullPointerException, and how do I fix it?](https://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it) – akortex Oct 12 '19 at 15:17
  • At the line 24 of AdminDaoimpl.java you access object being `null` – ivanjermakov Oct 12 '19 at 17:09
  • at line 24:ps = conn.prepareStatement("select * from admin_registration where emailid=? and password=?"); and initialized as PreparedStatement ps=null; this gives an error NullPointerException. Then what it should be initialized as? – L.Katta Oct 14 '19 at 16:13

0 Answers0