where can i get the document root for a servlet? i just want to load 'test.txt' without having to specify a full path but no matter where i put test.txt it never finds it.
correct me if i am wrong, are u referring to
path = getServletConfig.getServletContext.getRealPath("/"
File f = new File(path+"file"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.