在struts的action 中获取项目路径
//绝对路径
String abspathString=ServletActionContext.getServletContext().getRealPath("");
//相对路径
String root = ServletActionContext.getRequest().getContextPath();
在struts的action 中获取项目路径
//绝对路径
String abspathString=ServletActionContext.getServletContext().getRealPath("");
//相对路径
String root = ServletActionContext.getRequest().getContextPath();