struts2:上传文件时如何获取文件的本地真实路径?
------解决方案--------------------
String targetDirectory = context.getRealPath("/upload");
------解决方案--------------------
String tupi = getMyFileFileName();
------解决方案--------------------
String path = ServletActionContext.getServletContext().getRealPath("/");