request.getContextPath()  返回站点的根目录

request.getRealpath("/")得到的是实际的物理路径,也就是你的项目所在服务器中的路径

request.getScheme() 等到的是协议名称,默认是http

request.getServerName() 得到的是在服务器的配置文件中配置的服务器名称 比如:localhost .baidu.com 等等

request.getServerPort() 得到的是服务器的配置文件中配置的端口号 比如 8080等等

 

 

啦啦啦

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
猜你喜欢
  • 2022-12-23
  • 2021-08-12
  • 2021-10-13
  • 2021-08-02
  • 2021-12-17
  • 2022-12-23
  • 2022-02-07
相关资源
相似解决方案