Search code examples
javaspringjspjstldto

What is the framework's utility / pattern / language that permits to do this


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?


Solution

  • 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()}.

    See also: