与作用范围有关的EL隐含对象包含有:pageScope、requestScope、sessionScope和applicationScope
它们可以读取使用JSP内置对象pageContext、request、session以及application的setAttribute()方法所设定的对象的数值-----即getAttribute(String name),却不能取得其他相关信息。
|
1
2
3
4
5
6
7
|
Page:PageScope,使用方式${ pageScope.page_name } Request:RequestScope,使用方式${ requestScope.request_name },相当于<%=request.getAttribute("request_name");%> Session:SessionScope,使用方式${ sessionScope.session_name },相当于<%=session.getAttribute("session_name");%> Application:ApplicationScope,使用方式${ applicationScope.application_name },相当于<%=application.getAttribute("application_name");%> |
EL表达式中定义了11个隐式对象,使用这些隐式对象可以很方便地读取到Cookie、HTTP请求消息头字段、请求参数、
Web应用程序中的初始化参数的信息,EL表达式中的隐式对象具体如下:
1
原文:https://www.cnblogs.com/chenjiajiale/p/12565308.html