获取项目中的一些路径

来源:互联网 发布:mac版本excel下载安装 编辑:程序博客网 时间:2024/06/05 21:06

 //   /F:/apache-tomcat-6.0.20/webapps/uploadify/WEB-INF/classes/download/String path = this.getClass().getResource("").getPath(); //   /F:/apache-tomcat-6.0.20/webapps/uploadify/WEB-INF/classes/String path11 = this.getClass().getResource("/").getPath();// /uploadifyString path12 = request.getContextPath();// F:\\apache-tomcat-6.0.20\\webapps\\uploadify\\ServletContext s1=this.getServletContext();String temp = s1.getRealPath("/"); System.out.println(temp);  // 


0 0
原创粉丝点击