String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

 

一般放在jsp头部的代码,用于绝对路径。

相关文章:

  • 2021-09-13
  • 2021-12-22
  • 2021-11-30
  • 2021-05-24
  • 2022-12-23
  • 2021-11-20
  • 2021-06-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案