May I request a few minutes of your time, please? I would like to know if my interpretation is correct.
Question: The JSP document write-xhtml.jspx is supposed to produce XHTML output (as opposed to plain HTML). Let's further assume that the deployment descriptor is compliant with version 2.4, so that write-xhtml.jspx is undoubtfully a JSP document. Which of the following two templates should we use, to guarantee that the output is recognized to be XHTML?
Testing Testing reveals, that Template 1 generates
whereas Template 2 solely generates
Interpretation From my point of view the correct answer is "Template 1", for its output is XML-compliant and owns an XML declaration. I deem Template 2 wrong, since there is no clue concerning the content type.
SCJP (SE6), SCWCD (EE5)
Maybe he went home and went to bed. And took this tiny ad with him: