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

相关文章:

  • 2021-12-15
  • 2022-12-23
  • 2021-11-27
  • 2021-12-18
  • 2022-02-07
  • 2021-10-25
猜你喜欢
  • 2022-01-30
  • 2021-08-10
  • 2022-12-23
  • 2022-01-07
  • 2021-11-30
  • 2022-12-23
  • 2021-05-21
相关资源
相似解决方案