ServletActionContext.getRequest().getRealPath(savaPath);现在已经不能用了。用什么替换
ServletActionContext.getRequest().getRealPath(savaPath);
在struts2的action中要用什么替换呢
[解决办法]
ServletActionContext.getServletContext().getRealPath(savaPath);
发布时间: 2012-04-07 17:31:51 作者: rapoo
ServletActionContext.getRequest().getRealPath(savaPath);现在已经不能用了。用什么替换
ServletActionContext.getRequest().getRealPath(savaPath);
在struts2的action中要用什么替换呢
[解决办法]
ServletActionContext.getServletContext().getRealPath(savaPath);