>How can I, on a servlet, make the standard output (ie System.out) to be the
>output of the servlet so that if I do
>System.out.println("hello") this is printed out on the browser.

Do

service (HttpServletRequest theRequest, HttpServletResponse myResponse)
{
        PrintWriter out = myResponse.getWriter();
        out.println("Think Different"); //Take care about the HTML Syntax
        out.close();
}

Sometimes you work in a complete different object and one answer is
to pass the PrintWriter Object to the Object's Class constructor.

I know this sound too simple to be a answer.... anyway....
--
__________________________________
Andrés Wagner Acuña
Estudiante Ing. Civil Industrial
Universidad Adolfo Ibañez

ICQ: 39542425
__________________________________

"Programing today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying
to produce bigger and better idiots...
                                ...So far the universe is winning".

-Rich Cook

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to