项目有关路径

String path = request.getContextPath();//项目路径
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; //全路径

String localFilePath = request.getSession().getServletContext().getRealPath("/")+"static"+File.separator+"pdf";
 
localFilePath:
F:\workspace-neon\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\项目名称\static\pdf
posted @   NA-CODE  阅读(159)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示