java获取项目根路径

获取项目根路径:

HttpServletRequest request = ServletActionContext.getRequest();

String path = request.getSession().getServletContext().getRealPath("");

 

你可能感兴趣的:(java获取项目根路径)