gpt4 book ai didi

java - 两种 EL 语法有什么区别?

转载 作者:行者123 更新时间:2023-11-30 06:36:23 26 4
gpt4 key购买 nike

我想让表单字段在 JSP 表单中稳定,所以我使用:

${param.fieldName}

我试过这样做:

${param["fieldame"]}

并且也有效!

有人能告诉我有什么区别吗?

最佳答案

来自 Expression Language Specification Version 2.2 Maintenance Release :

1.6 Operators [] and .

expr-a.identifier-b is equivalent to expr-a["identifier-b"]; that is, the identifier identifier-b is used to construct a literal whose value is the identifier, and then the [] operator is used with that value.

关于java - 两种 EL 语法有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4910679/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com