liukaida 发表于 2017-1-21 10:26:46

得到tomcat目录的方法

String tomcatPath = System.getProperty("catalina.base");

  我的tomcat放在D盘,打印出来的路径是:
  D:\newtomcat28\apache-tomcat-5.5.26
  而用request.getRealPath("/")则是得到wabapps的所在目录。
页: [1]
查看完整版本: 得到tomcat目录的方法