获取tomcat绝对路径

HttpServletRequest request = ServletActionContext.getRequest();
    String path = request.getSession().getServletContext().getRealPath("/");

你可能感兴趣的:(获取tomcat绝对路径)