tomcat-users mailing list archives

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

hello

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 
error 
java.io.FileNotFoundException:

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";
                    xmlFileString.append(temp);
                }
            }

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,
mridu
-- 
View this message in context: http://www.nabble.com/Reading-a-xml-file-from-a-simple-java-programein-Tomcat-5.9.9-server-tf2421681.html#a6751633
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message