Methods Summary |
---|
public static java.util.Map | createApplicationScopeMap(javax.servlet.jsp.PageContext pContext)Creates the Map that "wraps" application-scoped attributes
final PageContext context = pContext;
return new EnumeratedMap ()
{
public Enumeration enumerateKeys ()
{
return context.getAttributeNamesInScope
(PageContext.APPLICATION_SCOPE);
}
public Object getValue (Object pKey)
{
if (pKey instanceof String) {
return context.getAttribute
((String) pKey,
PageContext.APPLICATION_SCOPE);
}
else {
return null;
}
}
public boolean isMutable ()
{
return true;
}
};
|
public static java.util.Map | createCookieMap(javax.servlet.jsp.PageContext pContext)Creates the Map that maps cookie name to the first matching
Cookie in request.getCookies().
// Read all the cookies and construct the entire map
HttpServletRequest request = (HttpServletRequest) pContext.getRequest ();
Cookie [] cookies = request.getCookies ();
Map ret = new HashMap ();
for (int i = 0; cookies != null && i < cookies.length; i++) {
Cookie cookie = cookies [i];
if (cookie != null) {
String name = cookie.getName ();
if (!ret.containsKey (name)) {
ret.put (name, cookie);
}
}
}
return ret;
|
public static java.util.Map | createHeaderMap(javax.servlet.jsp.PageContext pContext)Creates the Map that maps header name to single header
value.
final HttpServletRequest request =
(HttpServletRequest) pContext.getRequest ();
return new EnumeratedMap ()
{
public Enumeration enumerateKeys ()
{
return request.getHeaderNames ();
}
public Object getValue (Object pKey)
{
if (pKey instanceof String) {
return request.getHeader ((String) pKey);
}
else {
return null;
}
}
public boolean isMutable ()
{
return false;
}
};
|
public static java.util.Map | createHeadersMap(javax.servlet.jsp.PageContext pContext)Creates the Map that maps header name to an array of header
values.
final HttpServletRequest request =
(HttpServletRequest) pContext.getRequest ();
return new EnumeratedMap ()
{
public Enumeration enumerateKeys ()
{
return request.getHeaderNames ();
}
public Object getValue (Object pKey)
{
if (pKey instanceof String) {
// Drain the header enumeration
List l = new ArrayList ();
Enumeration enum_ = request.getHeaders ((String) pKey);
if (enum_ != null) {
while (enum_.hasMoreElements ()) {
l.add (enum_.nextElement ());
}
}
String [] ret = (String []) l.toArray (new String [l.size ()]);
return ret;
}
else {
return null;
}
}
public boolean isMutable ()
{
return false;
}
};
|
public static java.util.Map | createInitParamMap(javax.servlet.jsp.PageContext pContext)Creates the Map that maps init parameter name to single init
parameter value.
final ServletContext context = pContext.getServletContext ();
return new EnumeratedMap ()
{
public Enumeration enumerateKeys ()
{
return context.getInitParameterNames ();
}
public Object getValue (Object pKey)
{
if (pKey instanceof String) {
return context.getInitParameter ((String) pKey);
}
else {
return null;
}
}
public boolean isMutable ()
{
return false;
}
};
|
public static java.util.Map | createPageScopeMap(javax.servlet.jsp.PageContext pContext)Creates the Map that "wraps" page-scoped attributes
final PageContext context = pContext;
return new EnumeratedMap ()
{
public Enumeration enumerateKeys ()
{
return context.getAttributeNamesInScope
(PageContext.PAGE_SCOPE);
}
public Object getValue (Object pKey)
{
if (pKey instanceof String) {
return context.getAttribute
((String) pKey,
PageContext.PAGE_SCOPE);
}
else {
return null;
}
}
public boolean isMutable ()
{
return true;
}
};
|
public static java.util.Map | createParamMap(javax.servlet.jsp.PageContext pContext)Creates the Map that maps parameter name to single parameter
value.
final HttpServletRequest request =
(HttpServletRequest) pContext.getRequest ();
return new EnumeratedMap ()
{
public Enumeration enumerateKeys ()
{
return request.getParameterNames ();
}
public Object getValue (Object pKey)
{
if (pKey instanceof String) {
return request.getParameter ((String) pKey);
}
else {
return null;
}
}
public boolean isMutable ()
{
return false;
}
};
|
public static java.util.Map | createParamsMap(javax.servlet.jsp.PageContext pContext)Creates the Map that maps parameter name to an array of parameter
values.
final HttpServletRequest request =
(HttpServletRequest) pContext.getRequest ();
return new EnumeratedMap ()
{
public Enumeration enumerateKeys ()
{
return request.getParameterNames ();
}
public Object getValue (Object pKey)
{
if (pKey instanceof String) {
return request.getParameterValues ((String) pKey);
}
else {
return null;
}
}
public boolean isMutable ()
{
return false;
}
};
|
public static java.util.Map | createRequestScopeMap(javax.servlet.jsp.PageContext pContext)Creates the Map that "wraps" request-scoped attributes
final PageContext context = pContext;
return new EnumeratedMap ()
{
public Enumeration enumerateKeys ()
{
return context.getAttributeNamesInScope
(PageContext.REQUEST_SCOPE);
}
public Object getValue (Object pKey)
{
if (pKey instanceof String) {
return context.getAttribute
((String) pKey,
PageContext.REQUEST_SCOPE);
}
else {
return null;
}
}
public boolean isMutable ()
{
return true;
}
};
|
public static java.util.Map | createSessionScopeMap(javax.servlet.jsp.PageContext pContext)Creates the Map that "wraps" session-scoped attributes
final PageContext context = pContext;
return new EnumeratedMap ()
{
public Enumeration enumerateKeys ()
{
return context.getAttributeNamesInScope
(PageContext.SESSION_SCOPE);
}
public Object getValue (Object pKey)
{
if (pKey instanceof String) {
return context.getAttribute
((String) pKey,
PageContext.SESSION_SCOPE);
}
else {
return null;
}
}
public boolean isMutable ()
{
return true;
}
};
|
public java.util.Map | getApplicationScopeMap()Returns the Map that "wraps" application-scoped attributes
if (mApplication == null) {
mApplication = createApplicationScopeMap (mContext);
}
return mApplication;
|
public java.util.Map | getCookieMap()Returns the Map that maps cookie name to the first matching
Cookie in request.getCookies().
if (mCookie == null) {
mCookie = createCookieMap (mContext);
}
return mCookie;
|
public java.util.Map | getHeaderMap()Returns the Map that maps header name to a single header
values.
if (mHeader == null) {
mHeader = createHeaderMap (mContext);
}
return mHeader;
|
public java.util.Map | getHeadersMap()Returns the Map that maps header name to an array of header
values.
if (mHeaders == null) {
mHeaders = createHeadersMap (mContext);
}
return mHeaders;
|
public static org.apache.taglibs.standard.lang.jstl.ImplicitObjects | getImplicitObjects(javax.servlet.jsp.PageContext pContext)Finds the ImplicitObjects associated with the PageContext,
creating it if it doesn't yet exist.
ImplicitObjects objs =
(ImplicitObjects)
pContext.getAttribute (sAttributeName,
PageContext.PAGE_SCOPE);
if (objs == null) {
objs = new ImplicitObjects (pContext);
pContext.setAttribute (sAttributeName,
objs,
PageContext.PAGE_SCOPE);
}
return objs;
|
public java.util.Map | getInitParamMap()Returns the Map that maps init parameter name to a single init
parameter values.
if (mInitParam == null) {
mInitParam = createInitParamMap (mContext);
}
return mInitParam;
|
public java.util.Map | getPageScopeMap()Returns the Map that "wraps" page-scoped attributes
if (mPage == null) {
mPage = createPageScopeMap (mContext);
}
return mPage;
|
public java.util.Map | getParamMap()Returns the Map that maps parameter name to a single parameter
values.
if (mParam == null) {
mParam = createParamMap (mContext);
}
return mParam;
|
public java.util.Map | getParamsMap()Returns the Map that maps parameter name to an array of parameter
values.
if (mParams == null) {
mParams = createParamsMap (mContext);
}
return mParams;
|
public java.util.Map | getRequestScopeMap()Returns the Map that "wraps" request-scoped attributes
if (mRequest == null) {
mRequest = createRequestScopeMap (mContext);
}
return mRequest;
|
public java.util.Map | getSessionScopeMap()Returns the Map that "wraps" session-scoped attributes
if (mSession == null) {
mSession = createSessionScopeMap (mContext);
}
return mSession;
|