Hi all
I have the following problem:
I need to read/write a file for a servlet, both are
in my WEB-INF/classes directory. I use the code below:
String filename="myfile.abc";
File f=new File(filename);
RandomAccessFile raf=new
RandomAccessFile(f);
but it doesn't work, it seems like the file is
created somewhere in memory. Everything works fine when is used in an ordinary
java class.
When I change the filename to be an absolute path
it also works fine:
String
filename="D:\\tomcat\\webapps\\ROOT\\WEB-INF\\classes\\";
....
What am I doing wrong?
With best regards
Thank you in advance
Piotr Bieganowski
|
- Re: Problem with files Piotrek
- Re: Problem with files Padhu Vinirs
- Re: Problem with files Xu, John
- Re: Problem with files Raghupathy, Gurumoorthy
- Re: Problem with files Zerbe John W