Expression Language
Expression Language
What is EL?
The JSP Expression Language(EL) is
simple, special purpose language
designed for the web application
environment. EL was originally
developed in connection with JSP
standard Tag Library but not it has
been incorporated in JSP 2.0.
EL Syntax
${expression}
${empty obj}
Function implementation class
Like custom tags functions are
implemented in java classes and
registered in TLD.
The implementation function must be
public static method.
public class currency
{
public static double convert(double amount, String
fromcurrency, String tocurrency)
{
return amount * 1.44;
}
}
Registering the function
In order to make the function
available to a web application through
EL, we need to register it in Tag
Library Descriptor(TLD)
Element used to register functions
<function>
<name>
<function-class>
<function-signature>