Spring Protlet MVC研究報告
關鍵詞:
Portal Server , portlet , JSR-168規范
1. 關于Portal Server與portlet:
Portal的概念是基于Web的,以“應用整合”和“消除信息孤島”為最終目的,提供單點登錄、內容聚合、個性化門戶定制等功能。
Portal服務器是容納Portlet容器,支持Portlet呈現的普通或者特殊Web服務器。
Portal服務器優點:提供個性化設置、單點登錄、內容聚合、信息發布、權限管理等功能,支持各種信息數據來源,并將這些數據信息放在網頁中組合而成,提供個性化的內容定制,不同權限的瀏覽者能夠瀏覽不同的信息內容等。
在Portal概念提出后,許多大公司都推出了各自的Portal Server:
BEA. WebLogic Portal 8.1 SP4: IBM WebSphere Portal 5.1: SunOne Portal 2005Q1等。而且每一個大公司都有各自的標準。
Portlet在Sun公司未推出標準前,各家公司的標準都不兼容,于是,類似JavaTM Servlet 2.4 Specification (JSR154)標準。 SUN推出了兩個關于Portlets標準。
a) Java Portlet Specification 1.0 (JSR168), 2003年10月27日
b) Web Services for Remote Portlets 1.0, 2003年9月3日
節選自: Java Portlet Specification 1.0 (JSR168)
Portlets are web components -like Servlets- specifically designed to be aggregated in the context of a composite page.
Usually, many Portlets are invoked to in the single request of a Portal page. Each Portlet produces a fragment of markup that it s combined with the markup of other Portlets, all within the Portal page markup
其他免費Java 的portal Server: JBoss Portal 2.0, Apache Jetspeed 2, Apache Pluto 1.0.1
2. 現有Portal Server比較
a) JAVA Protal Server
a.1 Apache Pluto 1.0.1
以下是Spring Portlet Support下的pluto-spring-portlet-sample.zip 運行在Pluto后的效果:
b) MicroSoft Protal Server
b.1 Sharepoint Protal Server 2003/2005
總結: MS的protal概念與SUN提出的protal概念需要用意一樣都為了整合Web應用,但沒有統
一的標準。
兩者開發出來的應用不能由各自的Protal Server互相運行。
3. 問題
a) 需要用Spring protlet MVC 需要一個Protal Server ,需要確定選用哪個Protal Server
b) 選用Protal Server的原因,是因為要和.net開發的protlet應用集成?還是打算和以后的java開發的prolet應用集成?
前者未經過測試,成功岸例也不多。后者因為有JSR168規范,所有support此規范的Protal Server都應該支持。
4. Spring protlet MVC 與 Spring Web MVC
The Spring Portlet MVC project provides a complete MVC layer for the JSR-168 Portlet API in the same way that Spring Web MVC does for the Servlet API.
換句話說:
Spring Web MVC 的項目 在 Web Server上運行。
Spring protlet MVC 的項目 在 Protal Server上運行。
問題:
Spring Web MVC寫好的項目,經過a few改動(改繼承類和protlet.xml,和Spring-Applicationcontext.xml)就可以發布在Java Protal server上。