URI、URL、URN的关系
2020-06-06 本文已影响0人
上杉丶零
- URI:Uniform Resource Identifier,统一资源标识符,例如
request.getRequestURI()【/fas/user/registerVue】
- URL:Uniform Resource Locator,统一资源定位符,例如
request.getRequestURL()【http://localhost:8888/fas/user/registerVue】
- URN:Uniform Resource Name,统一资源名
关系
request.getRequestURL() = ip:port + (request.getRequestURI() = request.getContextPath() + request.getServletPath())
如:
request.getRequestURI() = /fas/user/registerVue
request.getRequestURL() = http://localhost:8888/fas/user/registerVue
request.getContextPath() = /fas
request.getServletPath() = /user/registerVue