tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Graham" <>
Subject data file read quandry
Date Mon, 29 Oct 2001 05:31:28 GMT
Hi I posted an email before but it was before
I joined the mailing list so I don't know if
it got through. My problem is that I am trying
to get a bean to read in a .txt file but its
not working. Either it cant find the file, or
it wont read in the file for some reason. Its
funny cause it works fine when I tested it in
my jdk. Is there some special place in tomcat
where I should put the data file? Here is
my bean code:
package mynewdev;

import java.util.Vector;

public class DataFileReader {

public Vector vect;

public DataFileReader(){

vect = new Vector();


public void readfile() throws Exception {

   FileReader fr = new FileReader("DataTable.txt");
   BufferedReader br = new BufferedReader(fr);
   String s;

   while((s = br.readLine()) != null) {





public String[] getItems(){

    String as[] = new String[vect.size()];
    return as;
Any help would be appreciated!

Get your FREE download of MSN Explorer at

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message