js|xml
– Resources
– Mappings
– Filters (JSP 1.2)
– 其它
3 現狀
3.1 業界支援
容器方面:
Apache,Allaire,ATG Dynamo,BEA Weblogic,Bluestone,Caucho,Gemstone,IBM’s WebSphere
Inprise AppServer,Iplanet iWS, iAS, Oracle,Persistence, Unify
一些使用者:
PeopleSoft,I2,CP ...
一些網站:
Delta.com, Food.com, CarOrder.com ...
工具
MacroMedia UltraDev,Adobe GoLive,Unify eWeb Studio,WebGain’s Studio
Forte for Java,Oracle Jdeveloper,Inprise Jbuilder,ATG Dynamo, ...
3.2 新的JSP & Servlets技術
* JSR-053
* Servlet 2.3
– Filters
– Application Events
* JSP 1.2
– JSP頁面的XML方式查詢
– 許多改進和增強
* Apache組織的推行
– jakarta.apache.org/tomcat
3.3 JSP Tag Library
* JSR-052
* 標準的JSP tag library
– 豐富的功能
– XSLT
– XPATH
– 其它的XML的進程
– Apache組織的推進( jakarta.apache.org/taglibs)
3.4 架構的支援
* J2EE體系
* JSP/Servlet體系
– Struts
– Apache組織的推進(jakarta.apache.org/struts)
3.5 JSP工具支援
* 大多數情況下是為頁面作者提供的
– 有一些是為TagLib工作者提供
* 已經存在於一些工具中
– 例如,UltraDev支援Struts
* 近6個月的預測
– 標準的taglib將出現,還有各種其他的taglib
3.6 XML解析和轉化
* JAXP 1.1
– 下一代 J2SE(JDK)的組成部分
– DOM level 2
– XSLT
– 和TRaX (XSLT啟用)進行組合
– Apache組織的推進
* XSLTC
– XSLT編譯器
– 更快,更小的指令碼
3.7 資料繫結
Beans Long Term Persistance
* Adelard
– 下一代J2SE的組成部分
– 資料繫結
* JavaBeans Long Term Persistance
– 下一代 J2SE的組成部分
– 圖形化Swing機制
3.8 XML Messaging
* XML messaging
– JMS
– ebXML
– JAXM
– Message Beans (J2EE 1.3)
(劇終)
*******************************
為防誤譯,特附原來文檔,這是sun網站的官方pdf文檔,有685K,我特地從中裁剪出來的。:)
JSP Technology and XML技術綱要
Eduardo Pelegri-Llopart
Sun Microsystems
pelegri@eng.sun.com
http://java.sun.com/jsp
提綱
* JSP, Servlets & J2EE
* JSP and XML
* Status
1 JSP, Servlets & J2EE
1。1 J2EE Platform
* Specification
* Compatibility Tests
* Reference Implementation (RI)
* Rich Functionality
– JSP and Servlets
– JDBC
– EJB
– JMS
– Connector to EIS (J2EE 1.3)
1。2 J2EE Benefits
* Common Mindshare
– Documentation
– Training
– Tool Support
* Portability
* Best-of-Breed Implementations
1。3 Web Layer of J2EE
(插圖1)
1.4 Role of JSP and Servlets
* Entry point to application
* Interacts with the exterior
* Usually through HTTP
* Client may be:
* Browser
* Applet
* Desktop application (Java Web Start)
* Wireless Device
* Server application (B2B)
1.5 JSP and Servlets
* Can be used in
– JSP & Servlet Container
– J2EE Container
* Common mindshare
* Best-of-breed implementation
* Wide support
1.6 What Is a Servlet?
* Extension mechanism
* Dynamic content generation
* Mapped to URLs
* Simple architecture
* Managed by container
1.7 JSP Page
* A textual document
* Describes a request – response map
* Servlet Semantics
1.8 一個例子
<?xml version="1.0">
<%@ page contentType=”text/xml” %>
<%@ taglib prefix="x" uri="..." %>
<wml>
<card id="card1" title="Flowers">
<p>
Flowers available:
<br/>
<x:enumerate inventory="flowers"
id="aFlower">
<%= aFlower.type %>
<br/>
</x:iterate>
<br/>
</p>
</card>
</wml>
1.9 JSP Page
* A textual document
* Builds on
– Template data
– Dynamic content
* Tool friendly
* Abstraction using
– JavaBeans
– Tag Libraries
1.10 Tag Libraries
* Abstraction Mechanism
* XML syntax
* Run-Time Protocol
– Integration into a JSP page
– Easy to compose and customize
– Managed by JSP container
– Simple protocol for simple needs
1.11 Roles Involved
* Page and Site Author
– Creates presentation from developer data
– Expert in UI
– Uses Tag Libraries & JavaBeans
– Page Authoring tools
* Developer
– Provides access to data for page author
– Expert in server-side organization
– Defines Tag Libraries & JavaBeans
– IDEs
2 JSP & XML
2.1 Uses of XML in JSP Technology
JSPs Pages
– Consuming XML
– Generating XML
– Transforming XML
* JSP Pages as XML documents
* XML configuration
2.2 Consuming XML
* Parse XML into objects (by developer)
– Hand-coded
– Using Adelard Technology
* Parse and Iterate abstraction
* Insert after transformation
– XSLT
2.3 Parse Into Object