- <%@?page?language="java"?import="java.util.*"?pageEncoding="utf-8"%>??
- <%??
- String?path?=?request.getContextPath();??
- String?basePath?=?request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";??
- %> ?
- <!DOCTYPE?HTML?PUBLIC?"-//W3C//DTD?HTML?4.01?Transitional//EN">??
- <html>??
- ??<head>??
- ????<base?href="<%=basePath%>"> ?
- ????<title>My?JSP?'PageContext.jsp'?starting?page</title> ?
- ????<meta?http-equiv="pragma"?content="no-cache">??
- ????<meta?http-equiv="cache-control"?content="no-cache">??
- ????<meta?http-equiv="expires"?content="0">??????
- ????<meta?http-equiv="keywords"?content="keyword1,keyword2,keyword3">??
- ????<meta?http-equiv="description"?content="This?is?my?page">??
- ????<!--??
- ????<link?rel="stylesheet"?type="text/css"?href="styles.css">??
- ????--> ?
- ??</head>??
- ????
- ??<body>??
- ???????<table?border="1"?align="center"?>??
- ???????????<tr>??
- ? ? ? ? ? ? ?<td>PageContext隐含对象的调用</td>??
- ???????????????<td>说明</td>??
- ???????????????<td>调用结果</td>??
- ???????????</tr>??
- ???????????<tr>??
- ???????????????<td>\${pageContext.request.queryString?}</td>??
- ???????????????<td>获取参数</td>??
- ???????????????<td>${pageContext.request.queryString?}</td>??
- ???????????</tr>??
- ???????????<tr>??
- ???????????????<td>\${pageContext.request.requestURL?}</td>??
- ???????????????<td>获取当前页面的地址,但是包含请求的参数</td>??
- ???????????????<td>${pageContext.request.requestURL?}</td>??
- ???????????</tr>??
- ???????????<tr>??
- ???????????????<td>\${pageContext.request.contextPath?}</td>??
- ???????????????<td>web的应用名称</td>??
- ???????????????<td>${pageContext.request.contextPath?}</td>??
- ???????????</tr>??
- ???????????<tr>??
- ???????????????<td>\${pageContext.request.method?}</td>??
- ???????????????<td>获取http的方法(get或post)</td>??
- ???????????????<td>${pageContext.request.method?}</td>??
- ???????????</tr>??
- ???????????<tr>??
- ???????????????<td>\${pageContext.request.remoteAddr?}</td>??
- ???????????????<td>获取用户的IP地址</td>??
- ???????????????<td>${pageContext.request.remoteAddr?}</td>??
- ???????????</tr>??
- ???????????<tr>??
- ???????????????<td>\${pageContext.session.id?}</td>??
- ???????????????<td>获取session的id属性值</td>??
- ???????????????<td>${pageContext.session.id?}</td>??
- ???????????</tr>??
- ?????????????
- ???????</table>??
- ??</body>??
- </html> ?
- 原文地址: http://www.heatpress123.net/cpzs/
详细解决方案
EL表达式中对pageContext暗含对象的调用
热度:220 发布时间:2012-11-26 11:48:49.0
相关解决方案
- ${pageContext.request.contextPath}获得绝对路径
- ${pageContext.request.contextPath}的功用
- javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext解决方法
- JSP内置对象详解四 之 page、out、exception、config、pageContext 内置对象
- ${pageContext.request.contextPath} JSP获得绝对路径
- javaScript ${pageContext.request.contextPath}取值有关问题
- pagecontext.getRequest()什么意思?该怎么解决
- request pageContext Session三者什么关系,该怎么解决
- ${pageContext.request.contextPath } 有关问题
- 如何使用xml配置多个似你想要的${pageContext.request.contextPath}
- 第十五节——解决${pageContext.request.contextPath}没有转化问题
- ${pagecontext.request.contextpath}绝对路径理解
- JSP常用内置对象:page、pageContext、config、exception
- jsp request、response、session、out、page、application、exception、pageContext、config对象详解
- 引用${pageContext.request.contextPath}报错
- JSP之项目路径问题(${pageContext.request.contextPath},%=request.getContextPath()%以及绝对路径获取)
- [九大内置对象]session、application、pageContext
- 访问前台页面${pageContext.request.contextPath}/el表达式失效问题解决
- pageContext、request、session和application区别
- ${pageContext.reuquest.contextPath}虚拟目录
- ${pageContext.request.contextPath}无法解析
- pageContext--四大作用域对象