Tutorials4u.net Forum

Full Version: Get the root dir of a web app
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In a JSP

String path = application.getRealPath("/");

In a Servlet

String path = getServletContext.getRealPath("/");
Reference URL's