Bennet Xavier wrote:Hi,
if file in context path say "MY_WEB_APPLICATION/my_text_file" and i have servlet in MY_WEB_APPLICATION/WEB-INF/classes/x/y/z/AccessFileServlet.classes
i tried to access the file using "../../../../../my_text_file"
if this is wrong, please tell me why.
Thanks,
Bennet Xavier. X
Why do you want to access the file in such a way. As already mentioned , you get the context root and navigate from that , and not from the current servlet class path. I guess you understand what i mean by context root.