1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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,283
    Likes Received:
    364
    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