获取项目在硬盘的绝对路径

<%

request.getRealPath("/");

%>

获取项目的http路径

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

相关文章:

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