Important points of JSP Expression Language

Chapter 7 - Building JSP Pages Using the Expression Language (EL)

    Important points of JSP Expression Language

  • JSP EL Important Points:

    1. EL expressions are always within curly braces prefixed with $ sign, for example ${expr}

    2. Disable EL expression in JSP by setting JSP page directive isELIgnored attribute value to TRUE.

    3. JSP EL can be used to get attributes, header, cookies, init params etc, butb cannot set the values

    4. JSP EL implicit objects are different from JSP implicit objects except pageContext.

    5. JSP EL pageContext implicit object is provided to get additional properties from request, response etc, for example getting HTTP request method.

    6. JSP EL is NULL friendly,given attribute is not found or expression returns null, it doesn’t throw any exception. For arithmetic operations, EL treats null as 0 and for logical operations, EL treats null as false.

    7. The [] operator is more powerful than dot operator because we can access list and array data too, it can be nested and argument to [] is evaluated when it’s not string literal.

© 2015 by Learncertification All Rights Reserved. The certification names are the trademarks of their respective owners. Terms & Privacy Policy