Technical outline of Jsp+xml (3)

Source: Internet
Author: User
Tags xpath xsl xslt
Js|xml

<%@ taglib uri= "..." prefix= "TL"%>
<tl:parse id= "Salebooks" type= "Bookinventory"
Xml= "Book_inventory_url"/>
<body>
<table border= "0" width= "50%" >
<tl:iterate
ID = "BK" type= "book"
Collection= "<%= salebooks.getbooks ()%>" >
<tr>
<td><jsp:getproperty name= "BK" property= "title"/></td>
</tr>
</tl:iterate>
</table>
</body>

2.4 Parse and iterate
<%@ taglib uri= "..." prefix= "TL"%>
<body>
<table border= "0" width= "50%" >
<tl:iterateonxmlstream
Id= "BK" type= "book"
Xml= "Book_inventory_url" >
<tr>
<td><jsp:getproperty name= "BK" property= "title"/></td>
</tr>
</tl:iterateOnXMLStream>
</table>
</body>

2.5 Combining Data
(Illustration 2)

2.6 Insert After transformation
<% @taglib uri= "http://jakarta.apache.org/taglibs/xsl/1.0"
prefix= "x"%>
<body>
<center> Welcome
<x:apply xml= "Customer_url" xsl= "store.xsl"/>!
<p>
On Sale today ...
<p>
<x:apply xml= "Inventory_url" xsl= "store.xsl"/>
</center>
</body>

2.7 Producing XML
* Client may be
–gateway
–device (WAP, XHTML)
* XML
* XML + StyleSheet

2.8 VoiceXML and WAP gateways
(Illustration 3)


2.9 Generating XML
J1 @ java.sun.com
(Illustration 4)

2.10 XSLT on XML
(Illustration 5)

2.11 JSP and XSLT
* JSP Strengths
–template & Java
–multiple Sources
–open-ended Portable Abstraction
* XSLT Strengths
–recursive Tree Transformation
–well defined Input/output
* XPath

2.12 Generating Content for
Multiple Devices
* One back end source
* Many Clients
* Minimize Total maintenance cost
* Desired Generation Performance

2.13 Multiple Clients
XSLT Stylesheet
(Illustration 6)

2. Multiple Clients
Short pipelines
(Illustration 7)

2.15 Multiple Clients
Combined approach
(Illustration 8)

2.16 Uses of XML in JSP Technology
* JSPs Pages
JSP Pages as XML documents
* XML Configuration

2.17 JSP Pages as XML Documents
* Manipulation
–apply XSLT to generate JSP
* Authoring
–jsp pages from XML objects
* Validation
–taglibraryvalidator
* Standarized in JSP 1.2

2.18 XML Configuration
* Tag Library Descriptor
* Servlet Configuration
–resources
–mappings
–filters (JSP 1.2)
–others

3 Status Quo

3. 1 Industry Support

Containers
Apache
Allaire
ATG Dynamo
BEA Weblogic
Bluestone
Caucho
Gemstone
IBM ' s WebSphere
Inprise AppServer
Iplanet IWS, IAS
Oracle
Persistence
Unify

Some Users
* PeopleSoft
* I2
* CP
* ...

Some Sites
* delta.com
* food.com
* carorder.com
* ...

Tools
* Macromedia
Ultradev
* Adobe golive
* Unify EWeb Studio
* webgain ' s Studio
* Forte for Java
* Oracle JDeveloper
* Inprise JBuilder
* ATG Dynamo
* ...

3. 2 New JSP & Servlets
* JSR-053
* Servlet 2.3
–filters
–application Events
* JSP 1.2
–xml View of JSP page
–many Improvements & Refinements
* Implementation @ ASF
–jakarta.apache.org/tomcat

3. 3 JSP Tag Library
* JSR-052
* Standard JSP Tag Library
–rich functionality
–xslt
–xpath
–other XML Processing
* Implementation @ ASF
–jakarta.apache.org/taglibs

3. 4 Framework efforts
* Java EE Framework
–blueprints
* Jsp/servlet Framework
–struts
–implementation @ ASF
–jakarta.apache.org/struts

3. 5 JSP Tool Support
* Mostly for Page authoring
–some for TagLib Authoring
* Already in several tools
–e.g. Ultradev support in Struts
* Focus Next 6 months
–standard taglib
–any taglib

3. 6 XML Parsing & transformation
* JAXP 1.1
–part of Next J2SE (JDK)
–dom Level 2
–xslt
–combined with TRaX (XSLT activation)
–implementation @ ASF
* XSLTC
–xslt compiler
–fast, Small footprint

3. 7 Data Binding
Beans Long Term persistance
* Adelard
–part of Next J2SE
–data Binding
* JavaBeans Long Term persistance
–part of Next J2SE
–generic Swing Machinery

3. 8 XML Messaging
* XML Messaging
–jms
–ebxml
–jaxm
–message Beans (Java 1.3)
**************************************************
Review
* JSP, Servlets & Java EE
* JSP
–consuming XML
–transforming XML
–producing XML

–relationship with XSLT
* Status of several jsp/xml efforts



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.