|
-
August 10th, 2006, 04:36 PM
#1
why i cant read simple text file in jsp
Hello all
i have this simple function that will read me line by line from giving text file
that is in the under webapps dir of my tomcat
public String getConst(String category,String param){
String filename = "\\conf.txt";
try{
java.io.BufferedReader in = new java.io.BufferedReader(new java.io.FileReader( filename) );
String str;
while ((str = in.readLine()) != null) {
str+=str;
}
return str;
}catch(java.io.IOException e){
return "file not found";
}
}
and stillim geting file not found all the time why is that?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|