美文网首页
request.getRequestURL()和request.

request.getRequestURL()和request.

作者: Jure_joe | 来源:发表于2019-07-10 16:41 被阅读0次

    request.getRequestURL() 返回全路径

    request.getRequestURI() 返回除去host(域名或者ip)部分的路径

    request.getContextPath() 返回工程名部分,如果工程映射为/,此处返回则为空

    request.getServletPath() 返回除去host和工程名部分的路径

    request.getRequestURL() http://localhost:8080/district_number/html/dataProcess.html

    request.getRequestURI() /district_number/html/dataProcess.html

    request.getContextPath()/district_number

    request.getServletPath()html/dataProcess.html

    相关文章

      网友评论

          本文标题:request.getRequestURL()和request.

          本文链接:https://www.haomeiwen.com/subject/bqohkctx.html