Deprecated classes from the jakarta.servlet.jsp.el package and dependent methods have been removed

This rule flags usage of removed classes from the jakarta.servlet.jsp.el package and related methods in the Jakarta Server Pages API.

Some classes from the jakarta.servlet.jsp.el package were deprecated in earlier versions and have been removed in Jakarta Server Pages 4.0. These removed classes were part of the legacy JSP Expression Language (EL) API, which has been replaced by the Unified Expression Language API, available in the jakarta.el package. Applications using these specific removed classes or their related methods should be updated to use the Unified EL APIs to remain compatible with JSP 4.0 and beyond.

Removed Classes from the jakarta.servlet.jsp.el package:

Removed Class

Replacement

jakarta.servlet.jsp.el.Expression

jakarta.el.ValueExpression

jakarta.servlet.jsp.el.ExpressionEvaluator

jakarta.el.ExpressionFactory​

jakarta.servlet.jsp.el.ELException

jakarta.el.ELException

jakarta.servlet.jsp.el.ELParseException

jakarta.el.ELException

jakarta.servlet.jsp.el.FunctionMapper

jakarta.el.FunctionMapper

jakarta.servlet.jsp.el.VariableResolver

jakarta.el.ELResolver

Removed Methods from Jakarta JSP API:

In addition to the removed classes, the following methods in the jakarta.servlet.jsp API were also removed due to their dependency on the jakarta.servlet.jsp.el package. These methods must be replaced with calls to the newer Unified EL APIs.

Removed Method

Replacement

jakarta.servlet.jsp.JspContext.getExpressionEvaluator()

jakarta.servlet.jsp.JspApplicationContext.getExpressionFactory()

jakarta.servlet.jsp.JspContext.getVariableResolver()

jakarta.el.ELContext.getELResolver(), obtained by jspContext.getELContext().getELResolver()

For more information, see the following resources: