HttpServletResponse object
in the below code,,why we r passing response object as the parameter to the sendPage2 method..... generally what request object and response object holds here.
public void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
firstName = request.getParameter("firstName");
lastName = request.getParameter("lastName");
if (firstName==null || lastName==null)
response.sendRedirect(page1Url);
sendPage2(response);
}
void sendPage2(HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<HTML>");
out.println("<HEAD>");
out.println("<TITLE>Page 2</TITLE>");
out.println("</HEAD>");
out.println("<BODY>");
out.println("<CENTER>");

