- java.lang.Object
- 
- jakarta.el.ELResolver
- 
- jakarta.servlet.jsp.el.ImplicitObjectELResolver
 
 
- 
 public class ImplicitObjectELResolver extends jakarta.el.ELResolverDefines variable resolution behavior for the EL implicit objects defined in the JSP specification.The following variables are resolved by this ELResolver, as per the JSP specification:- pageContext- the- PageContextobject.
- pageScope- a- Mapthat maps page-scoped attribute names to their values.
- requestScope- a- Mapthat maps request-scoped attribute names to their values.
- sessionScope- a- Mapthat maps session-scoped attribute names to their values.
- applicationScope- a- Mapthat maps application-scoped attribute names to their values.
- param- a- Mapthat maps parameter names to a single String parameter value (obtained by calling- ServletRequest.getParameter(String name)).
- paramValues- a- Mapthat maps parameter names to a- String[]of all values for that parameter (obtained by calling- ServletRequest.getParameterValues(String name)).
- header- a- Mapthat maps header names to a single String header value (obtained by calling- HttpServletRequest.getHeader(String name)).
- headerValues- a- Mapthat maps header names to a- String[]of all values for that header (obtained by calling- HttpServletRequest.getHeaders(String)).
- cookie- a- Mapthat maps cookie names to a single- Cookieobject. 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- Cookieobjects returned by the- getCookies()method. However, users of the cookie implicit object must be aware that the ordering of cookies is currently unspecified in the servlet specification.
- initParam- a- Mapthat maps context initialization parameter names to their String parameter value (obtained by calling- ServletContext.getInitParameter(String name)).
 - Since:
- JSP 2.1
- See Also:
- ELResolver
 
- 
- 
Constructor SummaryConstructors Constructor Description ImplicitObjectELResolver()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Class<String>getCommonPropertyType(jakarta.el.ELContext context, Object base)If the base object isnull, returnsString.class.Iterator<FeatureDescriptor>getFeatureDescriptors(jakarta.el.ELContext context, Object base)Deprecated, for removal: This API element is subject to removal in a future version.This method is deprecated as of EL 5.0 and will be removed in EL 6.0 (Jakarta EE 11).Class<?>getType(jakarta.el.ELContext context, Object base, Object property)If the base object isnull, and the property matches the name of a JSP implicit object, returnsnullto indicate that no types are ever accepted tosetValue().ObjectgetValue(jakarta.el.ELContext context, Object base, Object property)If the base object isnull, and the property matches the name of a JSP implicit object, returns the implicit object.booleanisReadOnly(jakarta.el.ELContext context, Object base, Object property)If the base object isnull, and the property matches the name of a JSP implicit object, returnstrueto indicate that implicit objects cannot be overwritten.voidsetValue(jakarta.el.ELContext context, Object base, Object property, Object val)If the base object isnull, and the property matches the name of a JSP implicit object, throwsPropertyNotWritableExceptionto indicate that implicit objects cannot be overwritten.
 
- 
- 
- 
Method Detail- 
getValuepublic Object getValue(jakarta.el.ELContext context, Object base, Object property) If the base object isnull, and the property matches the name of a JSP implicit object, returns the implicit object.The propertyResolvedproperty of theELContextobject must be set totrueby this resolver before returning if an implicit object is matched. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
- getValuein class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Only- nullis handled by this resolver. Other values will result in an immediate return.
- property- The name of the implicit object to resolve.
- Returns:
- If the propertyResolvedproperty ofELContextwas set totrue, then the implicit object; otherwise undefined.
- Throws:
- NullPointerException- if context is- null
 
 - 
getTypepublic Class<?> getType(jakarta.el.ELContext context, Object base, Object property) If the base object isnull, and the property matches the name of a JSP implicit object, returnsnullto indicate that no types are ever accepted tosetValue().The propertyResolvedproperty of theELContextobject must be set totrueby this resolver before returning if an implicit object is matched. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
- getTypein class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Only- nullis handled by this resolver. Other values will result in an immediate return.
- property- The name of the implicit object to resolve.
- Returns:
- If the propertyResolvedproperty ofELContextwas set totrue, thennull; otherwise undefined.
- Throws:
- NullPointerException- if context is- null
 
 - 
setValuepublic void setValue(jakarta.el.ELContext context, Object base, Object property, Object val)If the base object isnull, and the property matches the name of a JSP implicit object, throwsPropertyNotWritableExceptionto indicate that implicit objects cannot be overwritten.The propertyResolvedproperty of theELContextobject must be set totrueby this resolver before returning if an implicit object is matched. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
- setValuein class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Only- nullis handled by this resolver. Other values will result in an immediate return.
- property- The name of the implicit object.
- val- The value to be associated with the implicit object.
- Throws:
- NullPointerException- if context is- null.
- jakarta.el.PropertyNotWritableException- always thrown, if the implicit object name is recognized by this resolver.
 
 - 
isReadOnlypublic boolean isReadOnly(jakarta.el.ELContext context, Object base, Object property)If the base object isnull, and the property matches the name of a JSP implicit object, returnstrueto indicate that implicit objects cannot be overwritten.The propertyResolvedproperty of theELContextobject must be set totrueby this resolver before returning if an implicit object is matched. If this property is nottrueafter this method is called, the caller should ignore the return value.- Specified by:
- isReadOnlyin class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Only- nullis handled by this resolver. Other values will result in an immediate return.
- property- The name of the implicit object.
- Returns:
- If the propertyResolvedproperty ofELContextwas set totrue, thentrue; otherwise undefined.
- Throws:
- NullPointerException- if context is- null.
 
 - 
getFeatureDescriptors@Deprecated(forRemoval=true, since="JSP 3.1") public Iterator<FeatureDescriptor> getFeatureDescriptors(jakarta.el.ELContext context, Object base) Deprecated, for removal: This API element is subject to removal in a future version.This method is deprecated as of EL 5.0 and will be removed in EL 6.0 (Jakarta EE 11). Therefore it will be removed here in JSP 4.0.If the base object isnull, and the property matches the name of a JSP implicit object, returns anIteratorcontainingFeatureDescriptorobjects with information about each JSP implicit object resolved by this resolver. Otherwise, returnsnull.The Iteratorreturned must contain one instance ofFeatureDescriptorfor each of the EL implicit objects defined by the JSP spec. Each info object contains information about a single implicit object, and is initialized as follows:- displayName
- - The name of the implicit object.
- name
- - Same as displayName property.
- shortDescription
- - A suitable description for the implicit object. Will vary by implementation.
- expert
- - false
- hidden
- - false
- preferred
- - true
 FeatureDescriptors:- ELResolver.TYPE
- - The runtime type of the implicit object.
- ELResolver.RESOLVABLE_AT_DESIGN_TIME
- - true.
 - Overrides:
- getFeatureDescriptorsin class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Only- nullis handled by this resolver. Other values will result in a- nullreturn value.
- Returns:
- An Iteratorcontaining oneFeatureDescriptorobject for each implicit object, ornullifbaseis notnull.
 
 - 
getCommonPropertyTypepublic Class<String> getCommonPropertyType(jakarta.el.ELContext context, Object base) If the base object isnull, returnsString.class. Otherwise, returnsnull.- Specified by:
- getCommonPropertyTypein class- jakarta.el.ELResolver
- Parameters:
- context- The context of this evaluation.
- base- Only- nullis handled by this resolver. Other values will result in a- nullreturn value.
- Returns:
- nullif base is not- null; otherwise- String.class.
 
 
- 
 
-