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. CAD使用SetxDataDouble写数据(网页版)

    主要用到函数说明: MxDrawEntity::SetxDataDouble 写一个Double扩展数据,详细说明如下: 参数 说明 [in] BSTR val 字符串值 szAppName 扩展数据 ...

  2. MxCAD5.2 20181022更新

    下载地址: http://www.mxdraw.com/ndetail_10108.html 1. 开放VIP功能,无需购买即可使用 2. 修正一些图纸打开和保存出错的问题 3. 修改填充命令,对某些 ...

  3. ThinkPHP---AR模式

    [前言] 在之前学习框架时介绍过 (1)什么是框架? ①框架是一堆包含了常量.方法和类等代码集合: ②半成品应用,只包含了项目开发时的底层架构,并不包含业务逻辑: ③包含一些设计模式,例如单例模式,工 ...

  4. 第三节:EF

    1.删除要进行判空 public ActionResult DelClassMethod(string gId) { //根据gId查询对应条目 var grade = oc.BllSession.I ...

  5. 洛谷——P2158 [SDOI2008]仪仗队

    P2158 [SDOI2008]仪仗队 找规律大水题嘛,如果你做过P1170 兔八哥与猎人 这题得到的规律是$a,b,c,d$,若$gcd(a-b,c-d)==1$ 那么$a,b$就能看到$c,d$ ...

  6. HDU - 4810 - Wall Painting (位运算 + 数学)

    题意: 从给出的颜料中选出天数个,第一天选一个,第二天选二个... 例如:第二天从4个中选出两个,把这两个进行异或运算(xor)计入结果 对于每一天输出所有异或的和 $\sum_{i=1}^nC_{n ...

  7. C++ 迭代器运算符 箭头运算符->

    所有标准库容器都支持迭代器,只有少数几种才支持下标运算 迭代器运算符 运算符 作用 *iter 返回迭代器iter所指元素的引用 iter -> mem 解引用iter,并获取元素名为mem的成 ...

  8. SQLAlchemy-Utils

    由于sqlalchemy中没有提供choice方法,所以借助SQLAlchemy-Utils组件提供的choice方法. 安装: pip3 install sqlalchemy_utils 示例: f ...

  9. Django-REST_Framework 第三方登录

    DRF第三方登录,我们将使用第三方包实现!!! 1.首先安装 pip install social-auth-app-django 文档请看 https://python-social-auth.re ...

  10. Xshell(smarTTY)连接Linux虚拟机失败(未开放22端口)解决办法

    1.关闭防火墙: 命令:sudo ufw disable 2.安装openssh-server以及openssh-client: 命令:sudo apt-get install openssh-ser ...