String tomcatPath = System.getProperty("catalina.base");
我的tomcat放在D盘,打印出来的路径是:
D:\newtomcat28\apache-tomcat-5.5.26
而用request.getRealPath("/")则是得到wabapps的所在目录。
String tomcatPath = System.getProperty("catalina.base");
我的tomcat放在D盘,打印出来的路径是:
D:\newtomcat28\apache-tomcat-5.5.26
而用request.getRealPath("/")则是得到wabapps的所在目录。