"
My question is that there is no description of the variable pageContent and currentTip is accessed by the code that is used to get the property of attributes set in some scope. Because in previous examples of the book, the attributes are java bean objects and their properties are got by the getter methods. So here, it is apparent that currentTip is not an attribute but it is a property of the attribute pageContent. Is currentTip an attribute as taught by the book or it is property of attribute pageContent?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
第一段的措辞不正确。请求范围属性是
pageContent
。由于 JSP 代码使用${pageContent.currentTip}
,这意味着currentTip
是存储在属性pageContent
中的 bean 的属性。因此你的理解是正确的,而本书的第一段是错误的。The wording in the first paragraph is incorrect. The request-scope attribute is
pageContent
. Since the JSP code uses${pageContent.currentTip}
, this means thatcurrentTip
is a property of the bean stored in the attributepageContent
. Your understanding is thus correct, and the first paragraph of the book is wrong.