在javaEE 中获得web的路径

ServletActionContext.getServletContext().getRealPath("/upload/index");

原文地址:https://www.cnblogs.com/passer1991/p/3133795.html