struts2:上传文件时如何获取文件的本地真实路径?
struts2:上传文件时如何获取文件的本地真实路径?
[解决办法]
String targetDirectory = context.getRealPath("/upload");
[解决办法]
String tupi = getMyFileFileName();
[解决办法]
String path = ServletActionContext.getServletContext().getRealPath("/");
发布时间: 2012-01-20 18:53:53 作者: rapoo
struts2:上传文件时如何获取文件的本地真实路径?
struts2:上传文件时如何获取文件的本地真实路径?
[解决办法]
String targetDirectory = context.getRealPath("/upload");
[解决办法]
String tupi = getMyFileFileName();
[解决办法]
String path = ServletActionContext.getServletContext().getRealPath("/");