JSP+XML的技術綱要(3)

來源:互聯網
上載者:User
js|xml

 

<%@ 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:iterateOnXMLStream
id="bk" type="Book"
xml="Book_Inventory_URL">
<tr>
<td><jsp:getProperty name="bk" property="title"/></td>
</tr>
</tl:iterateOnXMLStream>
</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
– Gateway
– Device (WAP, XHTML)
* XML
* XML + StyleSheet

2.8 VoiceXML and WAP Gateways
(插圖3)


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

2.10 XSLT on XML
(插圖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
(插圖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
– 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 現狀

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
* J2EE 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 (J2EE 1.3)
**************************************************
Review
* JSP, Servlets & J2EE
* JSP
– Consuming XML
– Transforming XML
– Producing XML

– Relationship with XSLT
* Status of several JSP/XML efforts



相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.