String path = request.getContextPath();

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

path:/ArchManage

basePath:http://localhost:8080/ArchManage/

相对路径,在tomcat或者netware里面可能出现不一致导致异常,这样写死来,比较好一点。注意最后的basePath中是有/的。

相关文章:

  • 2022-02-03
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2021-12-19
  • 2021-09-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
相关资源
相似解决方案