Hi,

I have resolved this now.

The action code is:

File f = new File("test.log");

BufferedReader in = new BufferedReader(new FileReader(f));
String str;
while ((str = in.readLine()) != null) {
  buf.append("\n" + str);
}
in.close();
request.setAttribute("FILE", buf.toString());

and the jsp code (not pretty)is:

<%
 String text = (String)request.getAttribute("FILE");
 StringTokenizer tok = new StringTokenizer(text,"\n");

 int count = tok.countTokens();
 while (tok.hasMoreTokens()){
   out.print(tok.nextToken());%>
   <BR>
<%}


Andy

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to