File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: XML syntax
It's not a secret anymore!