Java servlet获得工程绝对路径 ServletContext con=getServletContext(); String savePath = con.getRealPath("/")即可