Tim Storms wrote:I don't agree. When an attribute occurs more than once, it doesn't give an error when its value is the same. The import and pageEncoding attributes may occur multiple times.
The answer is A in my opinion.
Page directive is used to specify a number of page specific attributes
such as content type, page encoding, classes to import and buffering
model etc. A translation unit can contain more than one instance of
page directive, in any order, anywhere and all attributes will be
applied together to the whole translation unit. However there are
few exceptions.
1. pageEncoding and contentType attributes must appear at the
beginning of the page.
2. An attribute must appear only once in a translation unit unless
the values of the attribute are same for all occurrences,
otherwise a translation error will occur. The import and
pageEncoding can appear more than once in a translation unit.
3. pageEncoding attribute can appear at most once per a file
otherwise a translation error will occur.
Note: A JSP source file and any other files included with include
directive is called the translation unit.