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

Discussion in 'Java' started by sakthi.abdullah, May 8, 2007.

Thread Status:
Not open for further replies.
  1. sakthi.abdullah

    sakthi.abdullah New Member

    Joined:
    Mar 15, 2007
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    0
    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 ??
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,351
    Likes Received:
    382
    Trophy Points:
    83
    Duplicate of [thread=4225]Servlet : PrintWriter out = rsp.getWriter(); --what does this do??[/thread]. Thread closed.
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice