0 0

tomcat6.0.18启动方式不同得到的new File("/file").getCanonicalPath()结果不同?0

Tomcat6.0.18(免安装)在D盘,在JSP页面中,输出一下内容:new java.io.File("/file").getCanonicalPath();
1、使用tomcat/bin/startup.bat启动Tomcat,访问jsp页面则输出结果为:"D:/file"
2、使用tomcat/bin/service install 把tomcat注册为系统服务,然后使用net start tomcat6启动tomcat服务,访问jsp页面则输出结果为:"C:/file",这是为什么呀?


问题补充:但是tomcat6.0.41就不存在这个问题
2014年10月15日 12:20
目前还没有答案

相关推荐

Global site tag (gtag.js) - Google Analytics