JavaServer Pages Documents - The Java EE 5 Tutorial
2. Using the Tutorial Examples
3. Getting Started with Web Applications
5. JavaServer Pages Technology
Including Directives in a JSP Document
Creating Static and Dynamic Content
Generating a Document Type Declaration
Identifying the JSP Document to the Container
7. JavaServer Pages Standard Tag Library
10. JavaServer Faces Technology
11. Using JavaServer Faces Technology in JSP Pages
12. Developing with JavaServer Faces Technology
13. Creating Custom UI Components
14. Configuring JavaServer Faces Applications
15. Internationalizing and Localizing Web Applications
16. Building Web Services with JAX-WS
17. Binding between XML Schema and Java Classes
19. SOAP with Attachments API for Java
21. Getting Started with Enterprise Beans
23. A Message-Driven Bean Example
24. Introduction to the Java Persistence API
25. Persistence in the Web Tier
26. Persistence in the EJB Tier
27. The Java Persistence Query Language
28. Introduction to Security in the Java EE Platform
29. Securing Java EE Applications
31. The Java Message Service API
32. Java EE Examples Using the JMS API
36. The Coffee Break Application
37. The Duke's Bank Application
Chapter 6
JavaServer Pages Documents
A JSP document is a JSP page written in XML syntax as opposed to the standard syntax described in Chapter 5, JavaServer Pages Technology. Because it is written in XML syntax, a JSP document is also an XML document and therefore gives you all the benefits offered by the XML standard:
You can author a JSP document using one of the many XML-aware tools on the market, enabling you to ensure that your JSP document is well-formed XML.
You can validate the JSP document against a document type definition (DTD).
You can nest and scope namespaces within a JSP document.
You can use a JSP document for data interchange between web applications and as part of a compile-time XML pipeline.
In addition to these benefits, the XML syntax gives the JSP page author less complexity and more flexibility. For example, a page author can use any XML document as a JSP document. Also, elements in XML syntax can be used in JSP pages written in standard syntax, allowing a gradual transition from JSP pages to JSP documents.
This chapter gives you details on the benefits of JSP documents and uses a simple example to show you how easy it is to create a JSP document.
You can also write tag files in XML syntax. This chapter covers only JSP documents. Writing tag files in XML syntax will be addressed in a future release of the tutorial.
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices



