Free WebSchools.com

Google


Submit ArticleForumsLive chat Webhosting Link TO Us SEO Toolsjobs & interview


HOME

Java Server Pages

JSP Introduction
JSP Syntax
JSP Expression
JSP Declaration
JSP Comments

JSP Directives
JSP Actions
JavaBeans
JSP Sessions
JSP JDBC
JSP And HTML Forms
JSP With XML

JSP Exam





XML with JSP







XML is the Meta language used for describing structured data. It is composed of tags and values. Often used to describe objects that are passed in messages between applications. Processing instructions begins with <? And end with?>. a sample XML documents cab be seen below

<? xml version=”1.0”?>
<item>
<id>1234</id>
<price>12</price>
<oty>4</qty>
</item>


This code snippet describes an ITEM object containing the attributes id, price and quantity. The hierarchy of the object is described in a container like fashion, showing the parent/child relationship of the item object

The JSP pages may be used to generate both html and XML pages. The XML tags may be included in as static template portion of the JSP page to create simple XML page. To generate dynamic XML tags, bean components or custom tags are required that generates XML output.

JSP pages are compatible with XML tools. With this XML compatible approach, page designers using HTML to create pages has an easy to use environment for quickly creating dynamic web pages and with the capabilities of XML based tools and services to integrating with JSP allows them to work with JSP complaint servers. A JSP page can be transformed into XML documents,

The table below displays the summary of these transformers

jsp page elementXML equivalement
<@ page….%><jsp:directive.page…./>
<%@ include ….%><jsp:directive.include…/>
<@ taglib …..%><jsp:declaration>…..</jsp:declaration>
<%.....%><jsp:scriptlet>…>/jsp:scriptlet>

Inform Friend About This Site

Your Name:

Friend's Name:

Friend's Email: