当前位置: 代码迷 >> Web前端 >> JEE中下上文地址的获取path && basePath
  详细解决方案

JEE中下上文地址的获取path && basePath

热度:790   发布时间:2012-11-08 08:48:11.0
JEE中上下文地址的获取path && basePath
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort() + path + "/";

结果:

/tasklist-ies

?

http://localhost:8080/tasklist-ies/

  相关解决方案