struts2设置了struts.multipart.saveDir后会在根目录建立文件夹,这样会涉及linux下的权限问题,最好不要设置,使用struts默认需要使用路径时,用下面的方法取得项目根目录的绝对路径(Tools为方法类)public static String getRootPath() {String classPath = Tools.class.getClassLoader().getResource("/").getPath();String rootPath = "";//windows下if("\\".equ Read More
posted @ 2011-12-13 11:27
七郎
Views(26427)
Comments(0)
Diggs(1)

浙公网安备 33010602011771号