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: ...
随机推荐
- Spring Boot 2.0的属性绑定
Spring Boot2.0的属性绑定 原文从Spring boot第一个版本以来,我们可以使用@ConfigurationProperties注解将属性绑定到对象.也可以指定属性的各种不同格式.比如 ...
- HDU多校Round 4
Solved:3 rank:405................................. B. Harvest of Apples 知道了S(n,m) 可以o(1)的求S(n - 1, m ...
- 迷宫自动生成以及基于DFS的自动寻路算法
直接贴代码 #include<ctime> #include<conio.h> #include<iostream> #include<windows.h&g ...
- UVA - 11536 Smallest Sub-Array(尺取法)
题目: 思路: 读完题之后第一时间想到的是尺取法来做这个题,结果让自己写写崩了,还是练得少!! 到网上搜了一下学习了大佬的标记方法,用一个变量来判断是不是都已经出现,要比每次都判断一下快超多. 代码: ...
- document.documentElement
1,释意document.documentElement 属性可返回文档的根节点.2,兼容在IE怪异模式下(IE8及以下)无法获取到 HTML标签,用document.body代替: 其余兼容问题参考 ...
- Tampermonkey脚本安装问题及自用脚本推荐
对于高手来说,chrome浏览器中即使没有其他任何chrome插件,可能都无关紧要.但是有一个插件必不可少, 那就是Tampermonkey油猴插件.Tampermonkey是Chrome上最流行的用 ...
- vue中axios设置
//设置默认全局baseURL axios.defaults.baseURL=process.env.BASE_API; //设置默认全局携带浏览器cookie axios.defaults.with ...
- gnulpot
gnulpot Table of Contents 1. Label position 2. coordinates 3. Symbols 4. key 4.1. key position 4.2. ...
- POJ 3468 线段树区间修改查询(Java,c++实现)
POJ 3468 (Java,c++实现) Java import java.io.*; import java.util.*; public class Main { static int n, m ...
- 对百词斩&可可英语的测试
第六周小组作业 基本任务:功能测试和测试管理 温馨提示:本篇博客中,看不清的图片,可以按住Ctrl同时滚动鼠标滚轮查看:也可以点击图片下方的链接,在新选项卡打开后,点击小加号查看. (1)计划说明 本 ...