<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
    主站蜘蛛池模板: 91亚洲精品自在在线观看| 亚洲AV中文无码乱人伦下载| 亚洲国产成人久久99精品| 免费人成在线观看网站| 亚洲精品卡2卡3卡4卡5卡区| 福利免费在线观看| 国产亚洲精品资源在线26u| 精品一区二区三区免费视频| 在线A亚洲老鸭窝天堂| a级精品九九九大片免费看| 在线观看亚洲精品国产| 黄网站色视频免费在线观看的a站最新| 国产精品亚洲一区二区三区在线| 在线观看片免费人成视频无码| 亚洲天堂久久精品| 免免费国产AAAAA片| 亚洲精品9999久久久久无码| 国产成人无码区免费A∨视频网站 国产成人涩涩涩视频在线观看免费 | 亚洲ⅴ国产v天堂a无码二区| 无人在线观看免费高清| 91亚洲精品自在在线观看| 免费看的黄色大片| 色吊丝性永久免费看码| 亚洲av中文无码乱人伦在线r▽| 91精品免费高清在线| 亚洲а∨天堂久久精品9966| 国产一级淫片免费播放| 在线免费观看伊人三级电影| 亚洲国产一区二区三区青草影视 | 免费观看毛片视频| fc2免费人成在线视频| 亚洲成色在线影院| aa级一级天堂片免费观看| 国产在亚洲线视频观看| 亚洲精品无码av人在线观看| 国产精品免费网站| 免费无码一区二区| 久久亚洲AV成人无码| 免费人成视频在线观看不卡| 精品无码国产污污污免费网站 | 一本色道久久88亚洲综合 |