I'm using this functionality since a while without knowing why I can use it: in a jsp page why I can call a getter method of a Dto without the 'get' part?
For example if my Dto class PersonDto has a method called getName(), in my jsp I can do this:
${person.name}
instead of this:
${person.getName()}
Is a characteristic of Spring framework, of MVC pattern, JSTL or a combination of them ? And where can I study this argument?
Is a characteristic of Spring framework, of MVC pattern, JSTL or a combination of them ?
None of them. It's called EL (Expression Language).
And where can I study this argument?
Start at our EL wiki page.
Noted should be that ${person.getName()}
syntax was illegal until EL version 2.2. It's thus certainly not so that ${person.name}
is newer than ${person.getName()}
.