Does EL automatically convert/cast the type? How does ${a.name} actually work?

前端 未结 2 1863
梦谈多话
梦谈多话 2021-01-06 06:40

I have a variable declared as type Object a which actually refers an instance of type A.

In EL, I can directly use the following expression

2条回答
  •  时光说笑
    2021-01-06 07:19

    It's because name is a property of the object a, and probably the object is also a JavaBean (not to be confused with Enterprise JavaBean).

    See here for Expression Language Documentation and here for a short tutorial.

提交回复
热议问题