您的位置:首页 > 产品设计 > UI/UE

request.getRealPath()的替代方法

2009-01-05 14:44 393 查看
替代方法是:

request.getSession().getServletContect().getRealPath()得到站点的绝对地址

在Servlet 和Struts中还可以用

this.getServletContect().getRealPath("/");

this.getServlet().getServletContect().getRealPath("/");
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  struts servlet