获取当前运行文件在服务器上的绝对路径: Servlet:this.getServletContect().getRealPath()Struts:this.getServlet().getServletContext().getRealPath()Action:ServletActionContext.getRequest().getRealPath()