request.getRequestURL()和request.getRequestURI() 区别

request.getRequestURL()和request.getRequestURI() 区别


request.getRequestURI() 返回值类似:/myContext/requestdemo.jsp
返回值是String

request.getRequestURL() 返回值类似:http://localhost:8080/myContext/requestdemo.jsp
返回值是StringBuffer

你可能感兴趣的:(jsp)