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

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

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

    kapok

    垃圾桶,嘿嘿,我藏的這么深你們還能找到啊,真牛!

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      455 隨筆 :: 0 文章 :: 76 評論 :: 0 Trackbacks

    http://dev2dev.bea.com/pub/a/2004/02/JSR168.html

    Developing JSR 168 Portlets with WebLogic Portal 8.1

    by Alex Toussaint, Subbu Allamaraju
    02/10/2004

    JSR 168 (Java Portlet) is a Java specification that aims at establishing portability between portlets and portals. One of the main goals of the specification is to define a set of standard Java APIs for portal and portlet vendors. These APIs will cover areas such as presentation, aggregation, security, and portlet lifecycle.

    Using JSR 168 (Java) Portlets with WebLogic Portal 8.1


    As an application developer you should examine the different types of portlets that are available in WebLogic Portal 8.1 and decide which type is best suited for the task you are trying to accomplish. For example, if you are looking for a way to interface with Java Controls, leverage Struts-based infrastructure, and deliver rich navigation elements then your choice may be Java Page Flow portlets. If you are looking for just a simple portlet or converting an existing JSP page into a portlet you may consider using a JSP portlet. If you work for an independent software company or other enterprise that is concerned with portability across multiple portlet containers, then you may choose to use JSR 168 compliant Java portlets.

    Below is a matrix to help you decide which implementation to use when building portlets:

    Portlet Types Pros Cons
    JSP or HTML based portlets
    • Simple to implement and deploy
    • Provides basic functionality without a lot of complexity
    • Business logic and presentation layer can get combined in JSPs
    • Not well suited for advanced portlet navigation
    JSR 168 based portlets
    • Accommodate portability for portlets across platforms
    • Does not require use of portal server specific JSP tags
    • Behavior is similar to a Servlet
    • Does not leverage BEA advanced portlet features
    • Requires deeper understanding of J2EE programming model
    Java Page Flow based portlets
    • Allow you to separate the user interface code from navigation control and other business logic
    • Provides the ability to model both simple and advanced portlet navigation
    • Allow you to quickly leverage Java Controls, Web Services, and Business Processes
    • Provides a visual environment to build rich applications based on Struts
    • Advanced Pageflow features not necessary for static or simple, one view portlets


    Components of the specification


    There are two main components associated with the JSR 168 -- portlets and portlet containers.

    1. Portlet: A portlet is a Java technology based Web component, managed by a portlet container that processes requests and generates dynamic content. Portlets are used by portals as pluggable user interface components providing a presentation layer to information systems.
    2. Portlet Container: A portlet container provides portlets with the required runtime environment, managing their lifecycle and persistent storage for portlet preferences.

    Java Portlets


    The Portlet APIs defined in the JSR 168 share many concepts with servlet APIs:

    1. Portlets are Java technology-based web components.
    2. A specialized container manages Portlets and portlet lifecycle.
    3. Portlets generate dynamic content.

    Portlets differ from servlets in the following aspects:

    1. Portlets generate only markup fragments, not complete documents. The Portal aggregates portlet markup fragments into a complete portal page.
    2. Portlets are not directly bound to a URL.
    3. Web clients interact with portlets through a portal system.
    4. Portlets have more refined request handling, action requests, and render requests.
    5. Portlets have predefined portlet modes and window states.

    Portlets also have access to the following extra functionality that is not provided by servlets:

    1. Portlets have the means for accessing and storing persistent configuration and customization data.
    2. Portlets have access to user profile information.
    3. Portlets have URL rewriting functions for creating hyperlinks which allow portal server agnostic creation of links and actions in page fragments.
    4. Portlets can store transient data in the portlet session into two different scopes: the application-wide scope and the portlet private scope.

    Java Portlet Container


    The Portlet container is an extension of the Servlet container. The Portlet API v1.0 is based on the Java 2 Platform, Enterprise Edition, v1.3. Portlet containers and portlets meet the requirements for executing within a J2EE environment as described in the J2EE specification.

    The Portlet container must use the same classloader that the servlet container uses for the Web application resources in order to load the portlets and related resources within the portlet application. The portlet container is responsible for informing portlets of user roles, but the portlet container does not deal with user authentication.

    BEA Implementation Overview


    BEA has implemented the portlet container to be compliant with JSR 168. The BEA implementation takes advantage of all the capabilities of the WebLogic Application Server in the areas of failover, scalability, security, and hot deployment of portlets. The Portlet container will manage all the lifecycle phases of the portlets. The implementation itself consists of several jar files that can be added to the Portal Web application.

    Figure 1: The typical flow of a request interacting with the Portlet Container

    1


    The portlet container supports the concept of Portlet Preferences. This allows one concrete portlet instance to be made available as logical instances to several users, and multiple instances per user, who in turn can customize the behavior and the look and feel associated with their logical instance. This infrastructure is already in place with WebLogic Portal 8.1 and it can be used with non-JSR168 portlets.

    JSR168 Hello World Portlet


    Below is an example of a JSR 168 compliant "Hello World" portlet:


      package examples.helloworld;
    
      import java.io.IOException;
      import javax.portlet.PortletException;
      import javax.portlet.GenericPortlet;
      import javax.portlet.RenderResponse;
      import javax.portlet.RenderRequest;
    
      public class HelloWorld extends GenericPortlet
    
      {
    
      public void render(RenderRequest request, RenderResponse response)
      throws PortletException, IOException
    
          {
                    response.getWriter().write("<p>Hello World</p>");
          }
    
      }
    

    Here is the portlet.xml file for the Hello World portlet:


      <?xml version="1.0" encoding="UTF-8"?>
      <portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="
      http://java.sun.com/xml/ns/portlet" xmlns="http://java.sun.com/xml/ns/portlet">
              <portlet>
                    <portlet-name>helloWorld</portlet-name>
                      <portlet-class>examples.helloworld.HelloWorld</portlet-class>
                    <portlet-info>
                              <title>Hello World</title>
                      </portlet-info>
              </portlet>
      </portlet-app>
    

    Summary


    The BEA WebLogic Portal team was actively involved with the expert group working on JSR 168. You can download the full implementaion of the JSR168 with the Weblogic Portal 8.1 SP2.

    For more Information on the JSR 168 and BEA WebLogic Portal 8.1:

    dev2dev BEA WebLogic Portal page:
    http://dev2dev.bea.com/products/wlportal81/index.jsp

    BEA WebLogic Portal documentation site:
    http://edocs.bea.com/wlp/docs81/index.html

    BEA WebLogic Portal Newsgroups:
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=WebLogic.developer.interest.portal&utag=

    BEA WebLogic Portal product page:
    http://www.bea.com/framework.jsp?CNT=index.htm&FP=/content/products/portal

    JSR 168 Home:
    http://www.jcp.org/en/jsr/detail?id=168

    posted on 2005-04-21 13:27 笨笨 閱讀(483) 評論(0)  編輯  收藏 所屬分類: J2EEALL 、Weblogic Portal
    主站蜘蛛池模板: 亚洲精品无码久久久久APP| 国产黄片不卡免费| 免费看一级做a爰片久久| 免费无遮挡无码视频在线观看| 国产精品亚洲αv天堂无码| 99re6免费视频| 国产偷国产偷亚洲清高APP| 亚洲开心婷婷中文字幕| 成年大片免费视频| 中国videos性高清免费| 亚洲av成人综合网 | 亚洲日韩小电影在线观看| 免费人成视频在线观看网站 | 久久亚洲春色中文字幕久久久 | 亚洲一区二区三区自拍公司| 免费观看国产网址你懂的| 免费看美女午夜大片| 亚洲国产超清无码专区| 浮力影院亚洲国产第一页| 好男人看视频免费2019中文| 成人爽a毛片免费| 337P日本欧洲亚洲大胆精品 | 特黄特色的大片观看免费视频| 亚洲精品午夜视频| 中文字幕不卡亚洲 | 亚洲va无码va在线va天堂| 日本免费人成视频播放 | 100000免费啪啪18免进| 久久国产美女免费观看精品| 亚洲日韩一区二区三区| 亚洲bt加勒比一区二区| 国产精品V亚洲精品V日韩精品 | 宅男666在线永久免费观看| 三年片在线观看免费大全电影 | 暖暖免费高清日本一区二区三区| 久操视频在线免费观看| 皇色在线免费视频| WWW国产亚洲精品久久麻豆| 亚洲妓女综合网99| 亚洲高清不卡视频| 国产V亚洲V天堂无码|