【正文】
t l e t E x c e p t i on, IO E x c e p t i on { P ri nt W ri t e r ou t = re s p on s e .g e t W ri t e r()。 out .p ri nt l n( h1 H e l l o W orl d / h1 )。 } } po r t l e t a pp c ol l e c t i on po r t l e t a pp de f po r t l e t a pp i d= po r t l e t s . e xa m pl e s . H e l l oW or l d po r t l e t na m e H e l l o W or l d P or tl e t A pp l i c a t i on / po r tl e t na m e s e r vl e t na m e H e l l oW or l d / s e r vl e t na m e po r t l e t c on fi g pa r a m na m e P or t l e t M a s t e r / pa r a m na m e pa r a m va l ue yo ur i d@ yo ur do m a i n. c om / pa r a m v a l ue / po r t l e t c on fi g a l l ow s m a xi m i z e d/ m i ni m i z e d/ r e s i z i ng / / a ll ow s s up po r t s vi e w / e di t / he l p/ c on fi gu r e / / s up po r t s / po r t l e t a pp c on c r e t e po r t l e t a pp i d= po r t l e t s . e xa m pl e s . H e l l oW or l d. 1 c on t e xt pa r a m pa r a m na m e foo ba r / pa r a m na m e pa r a m va l ue a va l ue / pa r a m va l u e / c on t e xt pa r a m c on c r e t e po r t l e t po r t l e t na m e H e l l o W or l d / po r t l e t na m e de fa ul t l oc a l e e n / de fa ul t l oc a l e l a ng ua ge l oc a l e = e n_ U S t i t l e H e l l o W or l d /t i t l e ti t l e s ho r t H e l l o W or l d / ti t l e s ho r t de s c r i pt i on H e l l o W or l d S a m pl e P or t l e t 1 / de s c r i pt i on ke yw or ds po r t l e t he l l o w or l d / ke yw or ds / l a ng ua ge c on fi g pa r a m pa r a m na m e P or t l e t M a s t e r / pa r a m na m e pa r a m va l ue yo ur i d@ yo ur do m a i n. c om / pa r a m va l ue / c on fi g pa r a m / c on c r e t e po r t l e t / c on c r e t e po r t l e t a pp / po r t l e t a pp de f / po r t l e t a pp c ol l e c t i on 圖 用 GridSpeed實現(xiàn)的“ Hello World”portlet 圖 GridSpeed的“ HelloWorldPortlet”描述符 2021/12/1 33 ? Jetspeed、 WebSphere Portal 和GridSphere的比較 ? JSR 168支持 ? 易用性 ? 可用性 ? 預(yù)構(gòu)建 portlet 2021/12/1 34 ? 使用 portlet開發(fā)網(wǎng)格門戶 P o r t al Lab G r i d P o r t alP o rt l e t 調(diào)用接口控制器視圖 模型網(wǎng)格 P o rt l e tS e rvl e t 請求S e rvl e t 響應(yīng)P o rt l e t 請求P o rt l e t 響應(yīng)OG S A 服務(wù)數(shù)據(jù)庫專門化工具高性能計算機網(wǎng)格存儲器G ri d 資源網(wǎng)格中間件工具圖 portlet訪問網(wǎng)格資源 2021/12/1 35 ? 第二代網(wǎng)格門戶小結(jié) 具有 portlet的第二代網(wǎng)格門戶和第一代網(wǎng)格門戶相比具有如下優(yōu)點: ? 門戶定制:用戶而不是網(wǎng)格系統(tǒng)開發(fā)者可構(gòu)建他們個性化的門戶,來滿足其特定的需要。 portlet可以比較容易地從門戶中加入或刪除。 ? 可擴展的網(wǎng)格服務(wù):由 portlet建立的門戶與網(wǎng)格中間件技術(shù)是松散耦合的,因為網(wǎng)格服務(wù)可當作標準的 portlet。由portlet構(gòu)建的門戶使用戶能夠集成來自不同網(wǎng)格服務(wù)提供者的服務(wù)。 ? 動態(tài)的網(wǎng)格服務(wù):可不斷為網(wǎng)格開發(fā)新的服務(wù)和組件。網(wǎng)格門戶應(yīng)該給用戶提供一種能力,使之能在一個網(wǎng)格環(huán)境中訪問動態(tài)的網(wǎng)格服務(wù)。最后,能夠提供一種機制,將網(wǎng)格服務(wù)當作個人 portlet,并可通過門戶來發(fā)布和訪問它們。 2021/12/1 36 要 點 ? 網(wǎng)格門戶提供基于 Web頁面的用戶接口,作為網(wǎng)格的單訪問點。 ? MyProxy已經(jīng)廣泛應(yīng)用于用戶憑證的管理。 ? JSP和 Java Servlet用來動態(tài)地產(chǎn)生門戶頁面。 ? 網(wǎng)格門戶可以廣義的分為第一代和第二代網(wǎng)格門戶。 ? 網(wǎng)格門戶主要用 JSP和 JavaBean與 Java CoG通信,與后臺基于 Globus的服務(wù)交互,尤其是 GT2。 ? 現(xiàn)有的網(wǎng)格門戶工具,如 GPDK、 GridPortal、 Ninf Portal 和 GridSpeed,可以對建立第一代網(wǎng)格門戶提供各種幫助。 ? 第一代網(wǎng)格門戶和網(wǎng)格中間件技術(shù)是緊密結(jié)合的,并且僅能提供靜態(tài)和受限制的網(wǎng)格服務(wù)。 ? 第一代網(wǎng)格門戶缺乏定制能力,門戶只能由網(wǎng)格系統(tǒng)開發(fā)者建立,而不能由用戶建立。對于終端用戶而言,修改已有的第一代網(wǎng)格門戶來滿足自己特有的需要是非常困難的。 ? portlet技術(shù)日益受到網(wǎng)格團體的關(guān)注,并用來開發(fā)第二代網(wǎng)格門戶。 ? 第二代網(wǎng)格門戶關(guān)注于 portlet,其支持用戶的可定制性,使得用戶可以建立個性化門戶。第二代門戶能提供可擴展的和動態(tài)的網(wǎng)格服務(wù)。 ? 來自 JSR 168的 Portlet API是編寫可移植 portlet的標準。