Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A JSP document template for XHTML output  RSS feed

Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Colleagues

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?

Template 1:

Template 2:

Testing reveals, that Template 1 generates

whereas Template 2 solely generates

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.

Kind regards,

Ralf Wahner
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!