In the Application: System.getProperty ( "user.dir") in a Servlet: ServletContext servletContext = config.getServletContext (); String rootPath = servletContext.getRealPath ( "/"); in the jsp: application.getRealPath ( "")