<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 笨笨 閱讀(485) 評論(0)  編輯  收藏 所屬分類: J2EEALLWeblogic Portal
    主站蜘蛛池模板: 免费人成再在线观看网站| 男性gay黄免费网站| 老司机亚洲精品影院无码| 亚洲AV永久无码精品成人| 亚洲无限乱码一二三四区| 亚洲精品国产日韩| 国产免费人成视频在线播放播| 久操视频免费观看| 永久免费毛片手机版在线看| 不卡精品国产_亚洲人成在线| 午夜亚洲AV日韩AV无码大全| 亚洲欧美日韩综合久久久久| 精品久久久久久无码免费| 亚洲精品无码精品mV在线观看| 亚洲国产精品日韩在线| 麻豆一区二区免费播放网站| 国产亚洲午夜高清国产拍精品 | 一级特黄aa毛片免费观看| 午夜毛片不卡免费观看视频| 日韩亚洲欧洲在线com91tv| 国产亚洲视频在线观看网址| 久久久久亚洲AV成人网人人软件| 99久久免费国产特黄| 日韩激情无码免费毛片| 亚洲色图古典武侠| 十八禁视频在线观看免费无码无遮挡骂过| 午夜神器成在线人成在线人免费| 粉色视频成年免费人15次| 亚洲无人区午夜福利码高清完整版| 美女被羞羞网站免费下载| 国产成人免费A在线视频| 亚洲免费视频网址| 国产无遮挡裸体免费视频在线观看| 国产精品无码素人福利免费| 国产精品永久免费| 中文字幕不卡亚洲| 亚洲精品视频免费观看| 亚洲视频在线不卡| 亚洲国产91精品无码专区| 国产亚洲视频在线| 亚洲av网址在线观看|