JSP隱含對象和EL表達式隱含對象

原文地址  http://blog.sina.com.cn/s/blog_5e9531a20100cc5k.htmlhtml


JSP的隱含對象:java

JSP隱含對象 Type Scope 經常使用的方法
request Subclass of javax.servlet.ServletRequest Request getAttribute, getParameter, getParameterNames, getParameterValues, setAttribute
response Subclass of javax.servlet.ServletResponse Page Not typically used by JSP page authors
pageContext javax.servlet.jsp.PageContext Page findAttribute, getAttribute, getAttributesScope, getAttributeNamesInScope, setAttribute
session javax.servlet.http.HttpSession Session getAttribute, getId, setAttribute
application javax.servlet.ServletContext Application getAttribute, getMimeType, getRealPath, setAttribute
out javax.servlet.jsp.JspWriter Page clear, clearBuffer, flush, getBufferSize, getRemaining
config javax.servlet.ServletConfig Page getInitParameter, getInitParameterNames
page java.lang.Object Page Not typically used by JSP page authors
exception java.lang.Throwable Page getMessage, getLocalizedMessage, printStackTrace, toString

 

 

 

 

EL表達式的隱含對象cookie

EL表達式的隱含對象 Type 具體說明
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)).

原文地址  http://blog.sina.com.cn/s/blog_5e9531a20100cc5k.htmlsession

相關文章
相關標籤/搜索