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

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

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

    談笑有鴻儒,往來無白丁

    在恰當(dāng)?shù)臅r間、地點以恰當(dāng)?shù)姆绞奖磉_(dá)給恰當(dāng)?shù)娜?..  閱讀的時候請注意分類,佛曰我日里面是談笑文章,其他是各個分類的文章,積極的熱情投入到寫博的隊伍中來,支持blogjava做大做強!向dudu站長致敬>> > 我的微博敬請收聽
    Portal開源實現(xiàn)-Liferay的Portlet Session處理(1)

    一、規(guī)范中的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規(guī)范里的一段。很明白的可以看出,每個Portlet Application應(yīng)該在Process Action和Render的時候應(yīng)該擁有自己私有的Session對象,來為當(dāng)前用戶服務(wù)。也就是說,如果某一個用戶在一個PORTAL系統(tǒng)中操作不同的PORTLET,而且這些PORTLET屬于不同的PORTLET APPLICATION,則,這個用戶將操作多個SESSION對象,用戶在每個PORTLET中操作SESSION時,這個SESSION都將是屬于該PORTLET所在的上下文的私有SESSION 對象。比如,用戶當(dāng)前頁面有三個PORTLET,每個PORTLET都屬于不同的PORTLET APPLICATION。則當(dāng)該用戶在第一個PORTLET里面有對SESSION的操作后,該PORTLET所屬的APPLICATION將為這個用戶生成一個SESSION;當(dāng)該用戶又操作第二個PORTLET中的SESSION時,該上下文有會對此用戶產(chǎn)生一個新的SESSION對象;第三個依然如此。加上PORTAL系統(tǒng)的SESSION,也就是該用戶實際和四個SESSION在大交道。

    另外要說明一點的是,PORTLET APPLICATION和WEB APPLICATION的關(guān)系。規(guī)范中有如下的定義:
    (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。規(guī)范中還有一段話更是說明了這個問題,同時也強調(diào)了PORTLET SESSION 和普通的該APPLICATION的SESSION的關(guān)系:
    (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對象。規(guī)范中有這樣一個例子:
    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相關(guān)文檔
    主站蜘蛛池模板: 热久久这里是精品6免费观看| 久久久久噜噜噜亚洲熟女综合| 国产做国产爱免费视频| 亚洲综合中文字幕无线码| 亚洲国产综合专区在线电影| xvideos亚洲永久网址| 成年女人毛片免费观看97| 91精品手机国产免费| CAOPORN国产精品免费视频| 春暖花开亚洲性无区一区二区| 亚洲一级毛片免费观看| 亚洲天堂久久精品| 亚洲精品乱码久久久久久自慰| 免费人成在线观看播放国产 | 18未年禁止免费观看| 国产做国产爱免费视频| 一二三区免费视频| 国产AV无码专区亚洲AV琪琪| 亚洲综合激情五月丁香六月| 亚洲人成电影青青在线播放| 亚洲综合小说久久另类区| 亚洲国产成人久久精品动漫| 亚洲精品蜜桃久久久久久| 亚洲三区在线观看无套内射| 精品国产亚洲男女在线线电影| jjzz亚洲亚洲女人| 免费乱码中文字幕网站| 四虎影视在线永久免费看黄| 日韩一级免费视频| 全部免费毛片免费播放| 拔擦拔擦8x华人免费久久| 国产网站免费观看| 四虎在线播放免费永久视频| 免费v片在线观看品善网| 免费中文字幕在线观看| 亚洲黄片毛片在线观看| 亚洲综合另类小说色区色噜噜| 亚洲性日韩精品国产一区二区| 国产成人精品亚洲精品| 亚洲中文字幕无码久久综合网| 亚洲色成人中文字幕网站|