Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Servlet : PrintWriter out = rsp.getWriter(); --what does this do?? (http://www.go4expert.com/forums/servlet-printwriter-rspgetwriter-t4226/)

sakthi.abdullah 8May2007 10:22

Servlet : PrintWriter out = rsp.getWriter(); --what does this do??
 
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 8May2007 11:00

Re: Servlet : PrintWriter out = rsp.getWriter(); --what does this do??
 
Duplicate of Servlet : PrintWriter out = rsp.getWriter(); --what does this do??. Thread closed.


All times are GMT +5.5. The time now is 10:17.