• 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 ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!