This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes XML syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "XML syntax" Watch "XML syntax" New topic

XML syntax

cyril vidal
Ranch Hand

Joined: Jul 02, 2003
Posts: 247
Dear all,
Did you ever tested it?
When you write JSP page in traditional syntax and want an HTML output, you don't have to specifie the attribute for the directive page, as text/html is the default value.
But when you write the same page (we should say document here) in XML syntax, you have to, because else the html that should be sent to output is readen by the browser as XML.
So you see XML in your browser instead of HTML.
If you then specify the value text/html for the attribute contentType in your page directive, all is OK..
This is not specified in the book SCWCD Exam Study Kit, but indeed happens with IE6, and I guess each web browser supporting XML...
It may be worth pointing it out.

SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287
It is sorta covered in the JavaRanch Style Guide.
subject: XML syntax