struts2获取tomcat中项目路径
//获取项目路径ActionContext ac = ActionContext.getContext(); ServletContext sc = (ServletContext) ac.get(ServletActionContext.SERVLET_CONTEXT); WEB_ROOT_PATH = sc.getRealPath("/");? 发布时间: 2012-12-17 09:31:40 作者: rapoo
struts2获取tomcat中项目路径
//获取项目路径ActionContext ac = ActionContext.getContext(); ServletContext sc = (ServletContext) ac.get(ServletActionContext.SERVLET_CONTEXT); WEB_ROOT_PATH = sc.getRealPath("/");?