Tomcat/JSP/Java

bacon333

Senior member
Mar 12, 2003
524
0
0
I am running tomcat locally and I'm trying to read a txt file. The only time it works is if I specify the path as "c:\java\commonwords.txt" if I specify a relative path like "commonwords.txt it tries to find the file at windows\system32

how the heck do i read this file? I have been coverting it to a URI and tried to use the getPath functions to get an absolute path and no luck.

Does anyone know what I can do? I'm desperate.
 

michaelh20

Senior member
Sep 4, 2000
482
0
0
What exactly are you trying to do?

To read the file as a stream?

To always open the same file without using a relative path?
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Dude, this is a complete copy of the other thread you started.