Class CmsJspElResolver
When using EE 10, a new ImportELResolver is present which tries to interpret EL variables as classes. This fires for all otherwise undefined variables, of which there are many in the Mercury template at runtime, causing a lot of class loading. This leads to a huge slowdown in Jetty, but not in Tomcat. Jetty and Tomcat (currently) use the same JSP engine, which marks standalone top-level identifiers, but only Tomcat's JSP API implementation makes use of that information to optimize the lookup.
This resolver tries to optimize the case where it finds such a marker, effectively disabling the class lookup for standalone identifiers, while preserving it for more complex expressions like ${Foo.bar}.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> getCommonPropertyType(jakarta.el.ELContext context, Object base) getFeatureDescriptors(jakarta.el.ELContext context, Object base) Dummy implementation that does nothing.Class<?> Resolves a stand-alone identifier from the scoped JSP attributes and ends the resolution, so that the identifier is not looked up as a class name.booleanisReadOnly(jakarta.el.ELContext context, Object base, Object property) voidMethods inherited from class jakarta.el.ELResolver
convertToType, invoke
-
Constructor Details
-
CmsJspElResolver
public CmsJspElResolver()
-
-
Method Details
-
getCommonPropertyType
- Specified by:
getCommonPropertyTypein classjakarta.el.ELResolver- See Also:
-
getFeatureDescriptors
Dummy implementation that does nothing. (this is only needed for Java EE 8 compatibility - in Java EE 8, it actually overrides a method from the parent class.)- Parameters:
context- the EL contextbase- the base object- Returns:
- null
-
getType
- Specified by:
getTypein classjakarta.el.ELResolver- See Also:
-
getValue
Resolves a stand-alone identifier from the scoped JSP attributes and ends the resolution, so that the identifier is not looked up as a class name.All other cases are left to the standard resolver chain.
- Specified by:
getValuein classjakarta.el.ELResolver- See Also:
-
isReadOnly
- Specified by:
isReadOnlyin classjakarta.el.ELResolver- See Also:
-
setValue
- Specified by:
setValuein classjakarta.el.ELResolver- See Also:
-