I got a question about DD's env-entry tag on the exam. It is gray on
page 205.
SCWCD Study Companion, pp. 439 - The tag directive wrote:tag is similar to page in that more than one tag directive may be declared, but only one occurence of any given attribute may be declared, unless each occurence of that attribute has the same value. The import and pageEncoding attributes are exceptions to this rule, and may appear multiple times.
The import and pageEncoding attributes are exceptions to this rule, and may appear multiple times.
JSP.1.10.1 The page Directive
...
A translation unit (JSP source file and any files included via the include directive)
...
There shall be only one occurrence of any attribute/value pair defined by this directive in a given translation unit, unless the values for
the duplicate attributes are identical for all occurrences. The import and pageEncoding attributes are exempt from this rule and can appear multiple times.
JSP 2.2 Specification, JSP1.10.1 The page directive wrote:There shall be only one occurrence of any attribute/value pair defined by this directive in a given translation unit, unless the values for the duplicate attributes are identical for all occurrences. The import and pageEncoding attributes are exempt from this rule and can appear multiple times. Multiple uses of the import attribute are cumulative (with ordered set union semantics). The pageEncoding attribute can occur at most once per file (or a translation error will result), and applies only to the file in which it appears.
As I understand it - the import and pageEncoding are exempts from the multiple-occurrences rule, but not in the same way.
Import is cumulative (which means that can break the rule and appear more than once with different values)
where the pageEncoding can appear only once