Servlet : PrintWriter out = rsp.getWriter(); --what does this do??

sakthi.abdullah's Avatar, Join Date: Mar 2007
Go4Expert Member
This code is a part of simple HelloWorld Servlet file . Can anyone please explain the highlighted statement ....


public void doGet(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException {
rsp.setContentType("text/html");
PrintWriter out = rsp.getWriter();
out.println("<html>");


What does that statement do ??
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Duplicate of Servlet : PrintWriter out = rsp.getWriter(); --what does this do??. Thread closed.