Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the default value of 'scope' attribute in JSTL tags?

Tags:

scope

jsp

jstl

It is not defined in docs neither for <fmt:message> nor for <c:url> tags.

like image 786
beemaster Avatar asked Mar 16 '16 15:03

beemaster


1 Answers

From JSTL specification (emphasis mine):

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.

...

In other words, the default is page, i.e. the current JSP page.

The same applies to <c:set>, by the way.

like image 169
BalusC Avatar answered Oct 19 '22 23:10

BalusC