严重: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException
protectedvoiddoPost(HttpServletRequestrequest,HttpServletResponseresponse)throwsServl...
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String path = request.getServletContext().getRealPath("/");
Dao dao=new Dao();
try {
ArrayList questions=dao.query(path);
request.setAttribute("questions", questions);
getServletContext().getRequestDispatcher("/BeingResult.jsp").forward(request,response);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
java web第一学期 这个错误是什么情况,求助。在servlet中。 展开
String path = request.getServletContext().getRealPath("/");
Dao dao=new Dao();
try {
ArrayList questions=dao.query(path);
request.setAttribute("questions", questions);
getServletContext().getRequestDispatcher("/BeingResult.jsp").forward(request,response);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
java web第一学期 这个错误是什么情况,求助。在servlet中。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询