> On Wed, 8 Aug 2001, Monte Glenn Gardner wrote :
=================================================

> can't you just read the file using a fileInputStream, and then
> output each line to the client?
>
> something like
>
> FileInputStream stream = new FileInputStream("CompanyData");
> BufferedReader reader = new BufferedReader(stream);
> PrintWriter out = new PrintWriter(responset.getOutputStream());
>
> String line = "";
> while ((line = reader.readLine) != null)
> {
>         out.println(line);
> }


Yes, that's what I finally tried to do. If I refer to Max's response, I have
to locate the file I want to include in my servlet in the main server
directory (/webapps, I suppose...).

Thanks a lot to you both.

Chris

___________________________________________________________________________
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