> getServletConfig().getServletContext() > .getServlet("bookstore.BookDBServlet"); The method ServletContext.getServlet(String) is deprecated since version 2.1. In the spec it is stated, that servlet engines should always return null. Instead (for forwarding to this servlet), use the RequestDispatcher: getServletConfig().getServletContext() .getRequestDispatcher("bookstore.BookDBServlet") .forward(request, response);