How to implement “instanceOf” in JSTL

后端 未结 1 620
醉酒成梦
醉酒成梦 2020-12-20 12:18

or say get class name or get type name

so that can work on major popular web container/servers?

Thank you.

1条回答
  •  天命终不由人
    2020-12-20 12:30

    ${foo.class.name} returns the fully qualidied name of foo.

    But instanceof being already something you should rarely use in a well-design OO program, it should be used even less in the JSP EL, where methods are called dynamically without caring of the actual type, and where the end goal should only be to generate markup.

    0 讨论(0)
提交回复
热议问题