struts2:上传文件时怎么获取文件的本地真实路径

struts2:上传文件时如何获取文件的本地真实路径?struts2:上传文件时如何获取文件的本地真实路径?[解决办法

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

[解决办法]
String targetDirectory = context.getRealPath("/upload");
[解决办法]
String tupi = getMyFileFileName();
[解决办法]
String path = ServletActionContext.getServletContext().getRealPath("/");