What is wrong with the code you posted?
Just send the output to the response stream instead of stdout.

--shawn

----- Original Message -----
From: Alexander Bonilla <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 17, 2000 4:06 PM
Subject: Re: How can i read a file in UNIX / AIX from an servlet


> Hello, I need suggestion for the following task:
>
> My problem is how can I read a file in UNIX / AIX from an servlet.
>
> Here a code.
>
> java.io.File file = new java.io.File("/usr/bin", "file.txt");
> java.io.BufferedReader in = new java.io.BufferedReader(new
> java.io.FileReader(file));
> String s = in.readLine();
> while (s != null) {
>         System.out.println(s);
> }
>
>
> Any suggestion?
>
> Thanks a all.
>
> Alex.
>
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to