简体   繁体   中英

Error importing a servlet project in Eclipse

I am importing a project in eclipse which is made in Servlet and JSP. Now the JSP part is working fine but the servlet part is throwing null pointer exception.

HTTP Status 500 – Internal Server Error
Type Exception Report

Description The server encountered an unexpected condition that prevented it 
from fulfilling the request.

Exception

java.lang.NullPointerException
java.util.Properties$LineReader.readLine(Unknown Source)
java.util.Properties.load0(Unknown Source)
java.util.Properties.load(Unknown Source)
com.pathology.util.DbUtil.getConnection(DbUtil.java:21)
com.pathology.dao.LoginDao.authenticateUser(LoginDao.java:27)
com.pathology.controller.LoginController.doPost(LoginController.java:42)
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)
Note The full stack trace of the root cause is available in the server logs.

Apache Tomcat/9.0.8

I have tried everything and also saw other answers but got no luck.

The problem is now solved. There was an error in file. 文件中存在错误。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM