request.getSession().getServletContect().getRealPath()得到站点的绝对地址
在Servlet 和Struts中还可以用
this.getServletContect().getRealPath("/");
this.getServlet().getServletContect().getRealPath("/");
ServletActionContext.getServletContext().getRealPath("comm");
request.getRealPath()的替代方法,布布扣,bubuko.com
原文:http://www.cnblogs.com/youliang/p/3873027.html