1. 首页
  2. 数据库
  3. 其它
  4. jsp页面中${pageContext.request.contextPath}介绍

jsp页面中${pageContext.request.contextPath}介绍

上传者: 2021-01-16 21:36:22上传 PDF文件 32.02KB 热度 14次
取出部署的当前的项目名或者叫当前应用名称: ${pageContext.request.contextPath}是JSP取得绝对路径的方法 例如:浏览器地址栏为”http://localhost:8080/test/index.jsp “ 那么:取出来的就是”http://localhost:8080/test”,简写为”/test” /test 等价于 http://localhost:8080/test / 等价于http://localhost:8080 此外: ${pageContext.request.contextPath} 等价于 绝对、相对路径的比较: (1)相对路径 特
下载地址
用户评论