日期:2014-05-17  浏览次数:20671 次

struts2:上传文件时如何获取文件的本地真实路径?
struts2:上传文件时如何获取文件的本地真实路径?

------解决方案--------------------
String targetDirectory = context.getRealPath("/upload");
------解决方案--------------------
String tupi = getMyFileFileName();
------解决方案--------------------
String path = ServletActionContext.getServletContext().getRealPath("/");