response对象

response对象

 

 

 response.setContentType("text/html;charset=utf-8");

response对象

    out.println("<h1>response内置对象</h1>");
    out.println("<hr>");
    //out.flush();
    PrintWriter outer=response.getWriter();   // 优先于内置对象out输出
    outer.println("大家好,我是response对象生成的输出流outer对象");
   // response.sendRedirect("exercise.jsp");
   request.getRequestDispatcher("do.jsp").forward(request, response);

response对象