This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
How do I find out a path of server root from servlet
servletContext.getRealPath( "/" );
Only works when the app is not being run out of an unexpanded war file.
Originally posted by John McDonald:
or current location of the running servlet?
I don't know what that means. The location of the class file? Other than that (which is not useful info generally), servlets don't really have the concept of a "location". [ March 20, 2006: Message edited by: Bear Bibeault ]