<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    談笑有鴻儒,往來無白丁

    在恰當的時間、地點以恰當的方式表達給恰當的人...  閱讀的時候請注意分類,佛曰我日里面是談笑文章,其他是各個分類的文章,積極的熱情投入到寫博的隊伍中來,支持blogjava做大做強!向dudu站長致敬>> > 我的微博敬請收聽
    Portal開源實現-Liferay的Portlet Session處理(1)

    一、規范中的SESSION描述

    (PortletSession objects must be scoped at the portlet application context level. Each portlet application has its own distinct PortletSession object per user session. The portlet container must not share the PortletSession object or the attributes stored in it among different portlet applications or among different user sessions.)
    上面這段話是portlet規范里的一段。很明白的可以看出,每個Portlet Application應該在Process Action和Render的時候應該擁有自己私有的Session對象,來為當前用戶服務。也就是說,如果某一個用戶在一個PORTAL系統中操作不同的PORTLET,而且這些PORTLET屬于不同的PORTLET APPLICATION,則,這個用戶將操作多個SESSION對象,用戶在每個PORTLET中操作SESSION時,這個SESSION都將是屬于該PORTLET所在的上下文的私有SESSION 對象。比如,用戶當前頁面有三個PORTLET,每個PORTLET都屬于不同的PORTLET APPLICATION。則當該用戶在第一個PORTLET里面有對SESSION的操作后,該PORTLET所屬的APPLICATION將為這個用戶生成一個SESSION;當該用戶又操作第二個PORTLET中的SESSION時,該上下文有會對此用戶產生一個新的SESSION對象;第三個依然如此。加上PORTAL系統的SESSION,也就是該用戶實際和四個SESSION在大交道。

    另外要說明一點的是,PORTLET APPLICATION和WEB APPLICATION的關系。規范中有如下的定義:
    (Portlets, servlets and JSPs are bundled in an extended web application called portlet application. Portlets, servlets and JSPs within the same portlet application share class loader, application context and session. )
    這說明PORTLET APPLICATION其實就是一個WEB APPLICATION。規范中還有一段話更是說明了這個問題,同時也強調了PORTLET SESSION 和普通的該APPLICATION的SESSION的關系:
    (A Portlet Application is also a Web Application. The Portlet Application may contain servlets and JSPs in addition to portlets. Portlets, servlets and JSPs may share information through their session. The PortletSession must store all attributes in the HttpSession of the portlet application. A direct consequence of this is that data stored in the HttpSession by servlets or JSPs is accessible to portlets through the PortletSession in the portlet application scope. Conversely, data stored by portlets in the PortletSession in the portlet application scope is accessible to servlets and JSPs through the HttpSession. If the HttpSession object is invalidated, the PortletSession object must also be invalidated by the portlet container. If the PortletSession object is invalidated by a portlet, the portlet container must invalidate the associated HttpSession object.)

    最后一點要說明的是怎樣得到PORTLET SESSION對象。規范中有這樣一個例子:
    PortletSession session = request.getSession(true);
    URL url = new URL(“http://www.foo.com“);
    session.setAttribute(“home.url”,url,PortletSession.APPLICATION_SCOPE);
    session.setAttribute(“bkg.color”,”RED”,PortletSession.PORTLET_SCOPE);

    posted on 2006-07-31 10:07 壞男孩 閱讀(712) 評論(0)  編輯  收藏 所屬分類: webserverPortal相關文檔
    主站蜘蛛池模板: 亚洲精品国产第一综合99久久| 中文字幕亚洲不卡在线亚瑟| 国产亚洲精品a在线观看app| 一级做a爰片久久毛片免费陪| 无码欧精品亚洲日韩一区夜夜嗨| 一级毛片在线观看免费| 久久精品免费电影| 成人免费看片又大又黄| 亚洲91精品麻豆国产系列在线| 亚洲成av人片天堂网无码】| 嫩草影院免费观看| 亚洲天堂免费在线视频| 亚洲美免无码中文字幕在线| 1000部拍拍拍18勿入免费视频下载 | 亚洲精品乱码久久久久久蜜桃不卡| 一级毛片在线完整免费观看| 亚洲乱码中文字幕综合| 国产 亚洲 中文在线 字幕 | 永久免费av无码网站yy| 日韩免费无砖专区2020狼| 亚洲大片在线观看| 91成人免费在线视频| 亚洲国产精品无码久久| 国产偷国产偷亚洲高清日韩| 日韩精品免费在线视频| 亚洲人成激情在线播放| 中文字幕不卡高清免费| 老色鬼久久亚洲AV综合| 一级黄色毛片免费看| 亚洲成A人片在线观看WWW| 免费精品国自产拍在线播放| 精品国产sm捆绑最大网免费站| 亚洲卡一卡二卡乱码新区| 亚洲高清成人一区二区三区| 亚洲日韩国产AV无码无码精品| 一级毛片免费视频| 亚洲国产欧美日韩精品一区二区三区 | 亚洲AV无码一区二区三区DV| 成年人网站免费视频| 日本中文字幕免费看| 亚洲精品在线免费看|