当前位置: 代码迷 >> JavaScript >> Jsp后盾取得网址
  详细解决方案

Jsp后盾取得网址

热度:172   发布时间:2012-10-30 16:13:36.0
Jsp后台取得网址
// 输出:http://localhost:8080/project/PayOrder.do
		logger.error("-------------- " + request.getRequestURL().toString()); 
// 输出:/PayOrder.do
		logger.error("-------------- " + request.getServletPath()); 
// 输出网址:http://localhost:8080/project
		logger.error("-------------- " + request.getRequestURL().toString().split(request.getServletPath())[0]); 
  相关解决方案