java web获取路径

class

URL save = Thread.currentThread().getContextClassLoader().getResource("");
String str = save.toString();
str = str.substring(6) +childPath;

 

webapp

String excelPath = request.getSession().getServletContext().getRealPath("dddd);
excelpath=D:\0pentakill\0code\ycgwl\pp\rosefinch-ppTest-web\target\webapp\dddd

 

posted @   zfzf1  阅读(109)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示