request.getSession().getServletContext().getRealPath() 得到站点的绝对地址
在servlet或者struts中还可以这样:
this.getServletContext().getRealPath("/");
this.getServlet().getServletContext().getRealPath("/");
此方法用于获得当前站点的绝对路径
request.getSession().getServletContext().getRealPath() 得到站点的绝对地址
在servlet或者struts中还可以这样:
this.getServletContext().getRealPath("/");
this.getServlet().getServletContext().getRealPath("/");
此方法用于获得当前站点的绝对路径