日期:2014-05-16  浏览次数:20402 次

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]);