The [] operator is like the dot only way better

The dot operator works only when the thing on the right is a bean property or map key for the thing on the left. That’s it. But the [ ] operator is a lot more powerful and flexible...

This:

${person["name"]}

Is the same as this:

${person.name}
image with no caption

The simple dot operator version works because person is a bean, and name is a property of person.

But what if person is an array?

Or what if person is a List?

Or what if name is something that can’t be expressed with the normal Java naming rules?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset