EL expressions are always used within curly braces, and prefixed with a dollar($) sign and $(expression). The first named variable in the expression is either an implicit object or an attribute stored in one of the the four scopes i.e. page, request, sess
Tutorial Details:
EL expressions are always used within curly braces, and prefixed with a dollar($) sign and $(expression). The first named variable in the expression is either an implicit object or an attribute stored in one of the the four scopes i.e. page, request, session, or application. The [] operator is much more powerful than the dot, because it lets you access Map key or a bean property name as well as the access to arrays and Lists.
ArrayList is resizable array implementation of the List interface. As the elements are increased in an ArrayList, its capacity also grows automatically. It can store all type of elements including null. In ArrayList, if you have to access the first value of the list by using the EL, we can retrieve it by using ${list["0"]} or ${list[0]}. EL doesn't care about if you have put quotes around the list index or not. If you don't put quotes inside the brackets, the web container evaluates it and gives you the result. If it is in quotes, and also not an index into an array or List, then the container sees it as the literal name or a property or a key.
Rate Tutorial: http://www.roseindia.net/jsp/simple-jsp-example/UseOf%5B%5DoperatorInELByUsingList.shtml
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: Using [ ] operator with the ArrayList
View Tutorial: Using [ ] operator with the ArrayList
Related
Tutorials:
|