JSP+XML的技术纲要(2)

80酷酷网    80kuku.com

  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
I2CP ...

一些站点:
Delta.com, Food.com, CarOrder.com ...

工具
MacroMedia UltraDev
Adobe GoLiveUnify eWeb StudioWebGain’s Studio
Forte for Java
Oracle JdeveloperInprise JbuilderATG 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
pelegrieng.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



分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: