This week's book giveaway is in the Web Services forum.
We're giving away four copies of Microservices in Action and have Morgan Bruce & Paulo A. Pereira on-line!
See this thread for details.
Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!