# where should I place my txt file on Tomcat 3.2.2

Mike Dafel
Greenhorn
Posts: 10
Hi,
This is an urgent problem. I have to read a txt file from my servlet, and I don't know where to put that file, I mean in which directory. Also, how should I reference that? I mean the relative path (e.g.: ../file.txt).
I am using tomcat 3.2.2
I have tried a lot, but no luck. Please this is urgent and ofcourse, thanks in advance.

prabhat kumar
Ranch Hand
Posts: 114
suppose u have placed ur application in
webapps/myapp
and /myapp directory structure is as follows

then u can refer to directory /myfiles form the /myservlets as:
"..\\webapps\\myapp\\myfiles\\abc.txt"
hope it will help
[ February 21, 2002: Message edited by: prabhat kumat ]

Mike Dafel
Greenhorn
Posts: 10
Thanks Prabhat. It worked.