JSTL 标签中 'scope' 属性的默认值是多少?
What is the default value of 'scope' attribute in JSTL tags?
在 docs 中没有为 <fmt:message>
和 <c:url>
标签定义。
来自 JSTL specification(强调我的):
2.2.1 var and scope
...
The scope
attribute has the semantics defined in the JSP specification, and takes the
same values as the ones allowed in the <jsp:useBean> action; i.e. page
, request
,
session
, application
. If no value is specified for scope
, page
scope is the
default unless otherwise specified.
...
即默认为page
,即当前JSP页
顺便一提,<c:set>
也是如此。
在 docs 中没有为 <fmt:message>
和 <c:url>
标签定义。
来自 JSTL specification(强调我的):
2.2.1 var and scope
...
The
scope
attribute has the semantics defined in the JSP specification, and takes the same values as the ones allowed in the <jsp:useBean> action; i.e.page
,request
,session
,application
. If no value is specified forscope
,page
scope is the default unless otherwise specified....
即默认为page
,即当前JSP页
顺便一提,<c:set>
也是如此。