tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mridu <>
Subject Reading a xml file from a simple java programein Tomcat 5.9.9 server
Date Wed, 11 Oct 2006 07:28:52 GMT


I am trying to read a file (xml file ) from a simple java programe which
will be called in a jsp page .Now i am getting the 

The code for the java programe is like 
String fileName = "/home/mpw/testdir/account.xml"
BufferedReader in = new BufferedReader(new FileReader(fileName));
 String line       = "";while (line != null)
                line = in.readLine();
                if (line != null)
                    String temp=line+"\n";

well i am using  jakarta-tomcat-5.5.9.How can i read the file ? can it be
possible without using ServletContext?

thanx in advance,
View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message