public class InitServlet extends HttpServlet{ public static String root; @Override public void init() throws ServletException { root = getServletContext().getRealPath("/"); }