Some important points about expression language:

-El always looks like ${something} . This something is called expression.
-When we write ${first.second}, the first can be a Map or an attribute of the four scopes(page,session,request,application).
-The dot operator lets you to access values by using a Map key or a bean property name.
-The [] operator is more powerful than dot. It has the dot operator capabilities as well as access to list or array.
-${} is same as ${person[“name”]}
-${person[name]} is not same as ${person[“name”]}
-To access musiclist(an arraylist in any scope) elements you can write ${musiclist[0]} or ${musiclist[“0”]}. Both are same.
-If what is inside the bracket is not in quotes then container evaluates it. And if it is in quotes and not an index of array or list, then the container sees it as the literal name of property or key.
-All but pageContext implicit objects are Map.
-Do not confuse requestScope implicit object of EL and jsp implicit request object. Both are different. Jsp request is the actual reference of request but requestScope is a Map.
-To use functions you must declare the name space using taglib directive.

No comments:

Post a Comment