gravatar

EL expressions

EL expressions handle null values gracefully in some cases...The following are the cases..

  • If the EL expression is of the following form ${attribute.xxxxxx} or ${bean.xxxx} and if the "attribute" or "bean"  is not present in any of the scopes
  • If the EL expression is of the following form ${map.key.xxxx} and if the key is not present in the map
  • If the EL expression is of the following form ${list_or_array[index]} and even if the index value is out of bounds..
EL expressions throws error in the following cases..
  • If the EL expresseion is of the following form ${bean.property} or ${bean["property"]} and if the "property" is not present in the bean.