basePath 方便

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

原文地址:https://www.cnblogs.com/yanjunwu/p/3504102.html