JSP中的内置对象一共有九个, 由于有的不太常用, 所以总是记不住, 从Sun公司的网站上找到的PDF文档, 把这一部分放在这里, 以备随时查用:
    JSP九个内置对象:
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
 
JSP十一个用于EL表达式的隐含(内置)对象:
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)).
 
 
EL表达式: ${requestScope.product.productId }
可换成Jsp: <%= request.getParamenter("product").productId %>

Jsp内置对象和EL隐藏(内置)对象的更多相关文章

  1. jsp的九大内置对象及EL表达式的隐含对象

    九大内置对象: request         request对象具有请求域,即完成客户端的请求之前,该对象一直有效. response       response对象具有页面作用域,即访问一个页面 ...

  2. jsp内置对象和el表达式内置对象误区

    未经允许禁止转载... jsp九大内置对象 EL表达式隐含的11个对象 隐含对象名称 描       述 pageContext 对应于JSP页面中的pageContext对象(注意:取的是pageC ...

  3. Jsp内置对象及EL表达式的使用

    一.JSP的内置对象(9个JSP内置对象) JSP的内置对象引用名称 对应的类型 request HttpServletRequest response HttpServletResponse ses ...

  4. JavaWeb之 JSP:内置对象,EL表达式,JSP标签基础

    JSP的内置对象 什么是JSP的内置对象呢? 在JSP页面进行编程的时候,如果我们要使用一些对象,如:HttpSession,ServletConfig,ServletContext这些对象,如果每次 ...

  5. JSP第四篇【EL表达式介绍、获取各类数据、11个内置对象、执行运算、回显数据、自定义函数、fn方法库】

    什么是EL表达式? 表达式语言(Expression Language,EL),EL表达式是用"${}"括起来的脚本,用来更方便的读取对象! EL表达式主要用来读取数据,进行内容的 ...

  6. jsp el的内置对象

    一.el内置对象(11个): pageScope (掌握) requestScope (掌握) applicationScope (掌握) sessionScope (掌握) param (了解) p ...

  7. JSP内置对象和EL内置对象

    JSP共有九大内置对象: (1) HttpSession类的session对象作用:主要用于来分别保存每个用户信息,与请求关联的会话:         会话状态维持是Web应用开发者必须面对的问题. ...

  8. JSP三个指令及9个内置对象

    注:本文编写方便自己以后用到时查阅 三大指令:include. page.taglib include指令:  作用: 在当前页面用于包含其他页面 语法: <%@include file=&qu ...

  9. JavaWeb学习笔记--2.jsp指令元素、动作元素、内置对象

    目录: 一.指令 1.1 page指令 :page指令有13种属性 1.2 include指令:include指令有1种属性,为file.(注意<%@ include%>和<jsp: ...

随机推荐

  1. EF-基础用法

    一丶LINQ TO SQL 语法 基本格式:  from c in 表名 where 条件 select c 二丶LINQ简介 LINQ是Language Integrated Query的简称,它是 ...

  2. @EnableConfigurationProperties

    参考:https://www.jianshu.com/p/7f54da1cb2eb 使用 @ConfigurationProperties 注解的类生效. 如果一个配置类只配置@Configurati ...

  3. TWaver3D特效之高光反射

    前篇我们介绍了TWaver 3D的环境映射特效,下面我们接着给大家分享高光反射特效.高光反射定义了物体上的某一区域比其他地方更反光.在高光反射的贴图中,黑色区域的反射率为0(完全不反光),白色区域的反 ...

  4. 「 Luogu P2285 」打鼹鼠

    解题思路 第一眼看上去觉得要设计一个三维的 DP,$dp[i][j][k]$ 表示在 $(i,j)$ 这个位置上 $k$ 时刻能够打死的最多的鼹鼠. 但是被数据范围卡死.完全开不开数组啊. 然后注意到 ...

  5. PKI相关知识简述

    1. 公钥泄露导致中间人攻击 有A.B.C三个人,如果C把自己的公钥提供给了AB双方,C伪装成B,让A认为C就B,这样A就把自己的公钥发送给C,C再伪装成A,让B认为C就A,B就把自己的公钥也发送给了 ...

  6. radis入门

    redis介绍 是远程的,有客户端.服务端 存内存,吃内存 应用场景 缓存 队列 list操作 push pop 数据存储[根据redis硬盘持久化的机制,这里不展开] 5种数据类型 string 字 ...

  7. ubuntu14.04 fcitx安装

    先卸载ibus sudo apt-get remove ibus (也可尝试不卸载ibus,直接安装fcitx) 添加源 sudo add-apt-repository ppa:fcitx-team/ ...

  8. LINUX-网络 - (以太网和WIFI无线)

    ifconfig eth0 显示一个以太网卡的配置 ifup eth0 启用一个 'eth0' 网络设备 ifdown eth0 禁用一个 'eth0' 网络设备 ifconfig eth0 192. ...

  9. this与const

    在普通非const成员函数中,this是const指针,而在const成员函数中,this是const对象的const指针. class Foo { Foo& get_self1(void) ...

  10. Linux命令介绍

    资料链接:(Linux基本命令介绍)http://note.youdao.com/share/?id=36c07917f8d3e6437c1e764c3516a3f2&type=note#/ ...