This should be really simple but I can't seem to get it to work.
All I'm trying to do is read a text file on the tomcat server.
frmCW = new BufferedReader(new FileReader(new File("common.txt")));
I am hosting tomcat 5 locally. The file can be read if I specify "c:\java\common.txt" but if i specify a relative path it looks at c:\windows\system32 for some reason. Has anyone ever ran into this problem?
I've tried getCanonicalpath , getAbsolutePath, everything and still no luck.
I have tried the suggestion here: http://forum.java.sun.com/thread.jspa?threadID=616327&messageID=3431287. It worked for the user but I'm not sure how to init the servletconfig().
All I'm trying to do is read a text file on the tomcat server.
frmCW = new BufferedReader(new FileReader(new File("common.txt")));
I am hosting tomcat 5 locally. The file can be read if I specify "c:\java\common.txt" but if i specify a relative path it looks at c:\windows\system32 for some reason. Has anyone ever ran into this problem?
I've tried getCanonicalpath , getAbsolutePath, everything and still no luck.
I have tried the suggestion here: http://forum.java.sun.com/thread.jspa?threadID=616327&messageID=3431287. It worked for the user but I'm not sure how to init the servletconfig().