request.getRealPath(String path) Deprecated

来源:互联网 发布:神经网络数据集 编辑:程序博客网 时间:2024/05/21 17:08

替代方法:

servlet中

getServletContext.getRealPath(String path);

struts 1.x中

request.getSession().getServletContext().getRealPath(String path);

二者中都可以使用的

this.getServletContect().getRealPath(String path);

this.getServlet().getServletContext().getRealPath(String path);