java获取tomcat路径

获取tomcat路径

String savePath3 = System.getProperty("catalina.home");

E:\apache-tomcat-7.0.63

获取工程路径

String savePath = request.getSession().getServletContext().getRealPath("/");

E:\apache-tomcat-7.0.63\webapps\cloud-tool\

 

你可能感兴趣的:(java获取tomcat路径)