我对java很陌生。尝试在服务器上运行我的servlet时,我收到java.lang.NullPointerException错误。有人可以告诉我所谓的getAllStaff是什么问题吗?
static StaffDAO dao = new StaffDAO();
static ArrayList<Staff> staffList = null;
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
staffList = dao.getAllStaff();
request.setAttribute("staff", staffList);