Jsp内置对象和EL隐藏(内置)对象
| Implicit Objects for Scriptlets (JSP Scriplets中的隐含对象) |
Type (对应类型) |
Scope (范围) |
Some Useful Methods (see class or interface for others) (常用的方法) |
|
| 1 | request | Subclass of javax.servlet.ServletRequest | Request | getAttribute, getParameter, getParameterNames, getParameterValues, setAttribute |
| 2 | response | Subclass of javax.servlet.ServletResponse | Page | Not typically used by JSP page authors |
| 3 | pageContext | javax.servlet.jsp.PageContext | Page | findAttribute, getAttribute, getAttributesScope, getAttributeNamesInScope, setAttribute |
| 4 | session | javax.servlet.http.HttpSession | Session | getAttribute, getId, setAttribute |
| 5 | application | javax.servlet.ServletContext | Application | getAttribute, getMimeType, getRealPath, setAttribute |
| 6 | out | javax.servlet.jsp.JspWriter | Page | clear, clearBuffer, flush, getBufferSize, getRemaining |
| 7 | config | javax.servlet.ServletConfig | Page | getInitParameter, getInitParameterNames |
| 8 | page | java.lang.Object | Page | Not typically used by JSP page authors |
| 9 | exception | java.lang.Throwable | Page | getMessage, getLocalizedMessage, printStackTrace, toString |
| Implicit Objects for EL Expressions 用于EL表达式的隐含对象 |
Type 类型 |
Description 具体说明 |
| pageContext | javax.servlet.jsp.PageContext | The context for the JSP page. Provides access to various objects, including servletContext, session, request, and response. |
| pageScope | java.util.Map | Maps page-scoped variable names to their values. |
| requestScope | java.util.Map | Maps request-scoped variable names to their values. |
| sessionScope | java.util.Map | Maps session-scoped variable names to their values. |
| applicationScope | java.util.Map | Maps application-scoped variable names to their values. |
| param | java.util.Map | Maps a request parameter to a single String parameter value (obtained by calling ServletReqwuest.getParameter(String name)). |
| paramValues | java.util.Map | Maps a request parameter name to an array of String values for that parameter name (obtained by calling ServletRequest.getParameterValues(String name)). |
| header | java.util.Map | Maps a request header name to a single String header value (obtained by calling ServletRequest.getHeader(String name)). |
| headerValues | java.util.Map | Maps a request header name to an array of String values for that header (obtained by calling ServletRequest.getHeaders(String)). |
| coookie | java.util.Map | Maps a cookie name to a single Cookie object. Cookies are retrieved according to the semantics of HttpServletRequest.getCookies(). If the same name is shared by multiple cookies, an implementation must use the first one encountered in the array of Cookie objects returned by the getCookies() method. However, the ordering of cookies is currently unsspecified in the Servlet specification. |
| initParam | java.util.Map | Maps a context initialization parameter name to a String parameter value (obtained by calling ServletContext.getInitparameter(String name)). |
Jsp内置对象和EL隐藏(内置)对象的更多相关文章
- jsp的九大内置对象及EL表达式的隐含对象
九大内置对象: request request对象具有请求域,即完成客户端的请求之前,该对象一直有效. response response对象具有页面作用域,即访问一个页面 ...
- jsp内置对象和el表达式内置对象误区
未经允许禁止转载... jsp九大内置对象 EL表达式隐含的11个对象 隐含对象名称 描 述 pageContext 对应于JSP页面中的pageContext对象(注意:取的是pageC ...
- Jsp内置对象及EL表达式的使用
一.JSP的内置对象(9个JSP内置对象) JSP的内置对象引用名称 对应的类型 request HttpServletRequest response HttpServletResponse ses ...
- JavaWeb之 JSP:内置对象,EL表达式,JSP标签基础
JSP的内置对象 什么是JSP的内置对象呢? 在JSP页面进行编程的时候,如果我们要使用一些对象,如:HttpSession,ServletConfig,ServletContext这些对象,如果每次 ...
- JSP第四篇【EL表达式介绍、获取各类数据、11个内置对象、执行运算、回显数据、自定义函数、fn方法库】
什么是EL表达式? 表达式语言(Expression Language,EL),EL表达式是用"${}"括起来的脚本,用来更方便的读取对象! EL表达式主要用来读取数据,进行内容的 ...
- jsp el的内置对象
一.el内置对象(11个): pageScope (掌握) requestScope (掌握) applicationScope (掌握) sessionScope (掌握) param (了解) p ...
- JSP内置对象和EL内置对象
JSP共有九大内置对象: (1) HttpSession类的session对象作用:主要用于来分别保存每个用户信息,与请求关联的会话: 会话状态维持是Web应用开发者必须面对的问题. ...
- JSP三个指令及9个内置对象
注:本文编写方便自己以后用到时查阅 三大指令:include. page.taglib include指令: 作用: 在当前页面用于包含其他页面 语法: <%@include file=&qu ...
- JavaWeb学习笔记--2.jsp指令元素、动作元素、内置对象
目录: 一.指令 1.1 page指令 :page指令有13种属性 1.2 include指令:include指令有1种属性,为file.(注意<%@ include%>和<jsp: ...
随机推荐
- vue中的input使用e.target.value赋值的问题
很久不写博客了... vue中对表单的处理,相对原生js,增加了一个双向绑定的语法糖:v-model.官方文档里有一段: v-model 会忽略所有表单元素的 value.checked.select ...
- wpf 自定义Button按钮
创建ButtonEx类 public class ButtonEx : Button { static ButtonEx() { DefaultStyleKeyProperty.OverrideMet ...
- linux运行jar报错
通过maven打jar包,然后复制到虚拟机上执行nohup java -jar xxx.jar &命令,运行jar文件,这时抛出了异常 com.mysql.jdbc.exceptions.jd ...
- UVA - 1608 Non-boring sequences(分治法)
题目: 如果一个序列的任意连续的子序列中至少有一个只出现一次的元素,则称这个序列是不无聊的.输入一个n(n≤200000)个元素的序列A(各个元素均为109以内的非负整数),判断它是不是不无聊的. 思 ...
- 【nginx】记录nginx+php-fpm实现大文件下载排坑的过程
先上一段代码,支持大文件下载和断点续传,代码来源互联网. set_time_limit(0); // 省略取文件路径的过程,这里直接是文件完整路径 $filePath = get_save_path( ...
- buf.writeInt8()函数详解
buf.writeInt8(value, offset[, noAssert]) value {Number} 需要被写入到 Buffer 的字节 offset {Number} 0 <= of ...
- lastpass密码管理工具使用教程
现在移动互联网发展异常空气,无论访问哪个平台或者网站必须要注册账号,日子久了就会发现最痛苦的就是记住这些网站的密码.因为我们不可能将所有的网站都是设置同样的的账号密码,因为国内网站用户数据库被泄露的事 ...
- 团队开发git使用各种问题
参考:https://www.cnblogs.com/schaepher/p/4933873.html 问题-3:保持github上项目干净,对于在不同机器上运行会不同的文件不予维护(如.idea/w ...
- noip模拟赛 轰炸
题目描述 C国和W国爆发了战争!YJC决定对W国的n个城市进行轰炸.每个城市都有一个重要度ai.设xi=‘重要度大于ai的城市数+1’,那么编号为i城市就是第xi个被轰炸的城市.显然这样能保证重要度大 ...
- CodeForces - 459C - Pashmak and Buses
先上题目+: C. Pashmak and Buses time limit per test 1 second memory limit per test 256 megabytes input s ...