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: ...
随机推荐
- windows如何统计端口的连接数
习惯了linux的系统管理员,对linux的命令行工具总是印象极深,几乎所有的管理都可以在命令行下完成.命令行工具是linux系统管理的主流. 而使用windows是,因为图形化的界面,大家习惯了图形 ...
- 话说Form标签的target属性-----无刷新表单提交
国庆前(2013)无聊,就在铁道部的12306上“逛”了下下. PS:原来之所以叫12306,是因为其客服号码是12306,好吧,我很无知…… 首先是被“逛”的页面:票价查询. 之所以去逛,是因为一直 ...
- restful风格url Get请求查询所有和根据id查询的合并成一个controller
restful风格url Get请求查询所有和根据id查询的合并成一个controller的方法 原代码 // 127.0.0.1:8080/dep/s @ApiOperation(value=&qu ...
- Django ContentType内置组件
一.引出问题 假如有这两张表,它们中的课程可能价格不一样.周期不一样.等等...不一样...,现在有一张价格策略表,怎么就用一张表报保存它们之间不同的数据呢? 可能你会这样: 确实是行!但是,如果有很 ...
- Swing之登录界面
import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Login extends JFrame ...
- idea 编译级别的设置
File->Settings Project Structure
- 使用JdbcTemplate和JdbcDaoSupport
[Spring对JDBC的支持] [JDBCTemplate简介] 1.为了是JDBC更加易于使用,Spring在JDBC API上定义了一个抽象层,以此建立一个JDBC存取框架. 2.作为Sprin ...
- Leetcode 93.复制IP地址
复制IP地址 给定一个只包含数字的字符串,复原它并返回所有可能的 IP 地址格式. 示例: 输入: "25525511135" 输出: ["255.255.11.135& ...
- [luoguP2038] 无线网络发射器选址(模拟)
传送门 又是个模拟水题,考虑边界就好,连long long都不用开. ——代码 #include <cstdio> #include <iostream> int n, d, ...
- hdu3461
题意描述:有一个类似滚轮式的密码锁放在一排共n个,有m种操作每次操作一个区间,且此次操作后的所有密码相同,问最多能形成多少种密码 解决:将区间分为可变部分和不可变部分,没当有可变部分时候总区间数要减去 ...