1. 首页
  2. 数据库
  3. 其它
  4. jsp获取url路径的方法分析

jsp获取url路径的方法分析

上传者: 2021-01-15 17:11:42上传 PDF文件 33.88KB 热度 24次
本文实例讲述了jsp获取url路径的方法。分享给大家供大家参考,具体如下: 如果你请求的URL是 http://localhost:8080/demo/Index.jsp request.getScheme() //输出:http request.getServerName() //输出: localhost request.getServerPort() //输出: 8080 request.getContextPath() //输出: /demo request.getRequestPath() //输出: /Index.jsp request.gerRequestURI() /
下载地址
用户评论