<%@ taglib uri="..." prefix="tl" %>
<html>
<tl:parse id="saleBooks" type="BookInventory"
xml="Book_Inventory_URL"/>
<head>...
<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>
</html>
2.4 Parse and Iterate
<%@ taglib uri="..." prefix="tl" %>
<html>
<head>...
<body>
<table border="0" width="50%">
<tl:iterateOn
XMLStream
id="bk" type="Book"
xml="Book_Inventory_URL">
<tr>
<td><jsp:getProperty name="bk" property="title"/></td>
</tr>
</tl:iterateOn
XMLStream>
</table>
</body>
</html>
2.5 Combining Data
(插图2)
2.6 Insert After Transformation
<%@taglib uri="http://jakarta.apache.org/taglibs/xsl/1.0"
prefix="x" %>
<html>
<head>...
<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>
</html>
2.7 Producing
XML* Client may be
&;#8211; Gateway
&;#8211; Device (WAP, XHTML)
*
XML*
XML StyleSheet
2.8 Voice
XML and WAP Gateways
(插图3)
2.9 Generating
XMLJ1 @ java.sun.com
(插图4)
2.10 XSLT on
XML(插图5)
2.11
JSP and XSLT
*
JSP strengths
&;#8211; Template &;amp; Java
&;#8211; Multiple Sources
&;#8211; Open-ended Portable Abstraction
* XSLT strengths
&;#8211; Recursive tree transformation
&;#8211; 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
(插图6)
2。14 Multiple Clients
Short Pipelines
(插图7)
2.15 Multiple Clients
Combined Approach
(插图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
&;#8211; Apply XSLT to generate
JSP* Authoring
&;#8211;
JSP pages from
XML objects
* Validation
&;#8211; TagLibraryValidator
* Standarized in
JSP 1.2
2.18
XML Configuration
* Tag Library Descriptor
* Servlet configuration
&;#8211; Resources
&;#8211; Mappings
&;#8211; Filters (
JSP 1.2)
&;#8211; others
3 现状
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 &;amp; Servlets
* JSR-053
* Servlet 2.3
&;#8211; Filters
&;#8211; Application Events
*
JSP 1.2
&;#8211;
XML view of
JSP page
&;#8211; Many improvements &;amp; refinements
* Implementation @ ASF
&;#8211; jakarta.apache.org/tomcat
3。3
JSP Tag Library
* JSR-052
* Standard
JSP tag library
&;#8211; Rich functionality
&;#8211; XSLT
&;#8211; XPATH
&;#8211; Other
XML processing
* Implementation @ ASF
&;#8211; jakarta.apache.org/taglibs
3。4 Framework efforts
* J2EE Framework
&;#8211; Blueprints
*
JSP / Servlet Framework
&;#8211; Struts
&;#8211; Implementation @ ASF
&;#8211; jakarta.apache.org/struts
3。5
JSP Tool Support
* Mostly for Page Authoring
&;#8211; Some for TagLib Authoring
* Already in several tools
&;#8211; e.g. UltraDev support in Struts
* Focus next 6 months
&;#8211; Standard taglib
&;#8211; Any taglib
3。6
XML Parsing &;amp; Transformation
* JAXP 1.1
&;#8211; Part of next J2SE (JDK)
&;#8211; DOM level 2
&;#8211; XSLT
&;#8211; Combined with TRaX (XSLT activation)
&;#8211; Implementation @ ASF
* XSLTC
&;#8211; XSLT compiler
&;#8211; Fast, Small footprint
3。7 Data Binding
Beans Long Term Persistance
* Adelard
&;#8211; Part of next J2SE
&;#8211; Data Binding
* JavaBeans Long Term Persistance
&;#8211; Part of next J2SE
&;#8211; Generic Swing Machinery
3。8
XML Messaging
*
XML messaging
&;#8211; JMS
&;#8211; eb
XML&;#8211; JAXM
&;#8211; Message Beans (J2EE 1.3)
**************************************************
Review
*
JSP, Servlets &;amp; J2EE
*
JSP&;#8211; Consuming
XML&;#8211; Transforming
XML&;#8211; Producing
XML &;#8211; Relationship with XSLT
* Status of several
JSP/
XML efforts