passer1991

eclipse项目发布到tomcat后的默认部署路径

eclipse项目发布到tomcat后的默认部署路径是不确定的,但是可以通过在项目中打印的方式显示eclipse默认的部署路径,比如在springmvc中

String basePath=ContextLoader.getCurrentWebApplicationContext().getServletContext().getRealPath("/") ;
System.out.println(basePath);

这样就可以在控制台看到路径了。

 

 

posted on 2014-01-17 14:35  passer1991  阅读(240)  评论(0编辑  收藏  举报

导航