获取J2ee工程在应用服务器(如tomcat)下的物理路径
ActionContext ac = ActionContext.getContext();
ServletContext sc = (ServletContext) ac.get(ServletActionContext.SERVLET_CONTEXT);
String path = sc.getRealPath("/");