显示java.lang.NullPointerException

时间:2016-01-03 20:14:26

标签: java nullpointerexception

我对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);

0 个答案:

没有答案