规范中的组件
1. Portlet:portlet 是一个基于 Java 技术的 Web 组件,它由负责处理请求和生成动态内容的 portlet 容器管理。Portlet 被门户用作可插入用户界面组件,用户界面组件用于在信息系统中提供表示层。 2. Portlet 容器:portlet 容器为 portlet提供所需的运行时环境,为 portlet 首选项管理生命周期和持久性存储。 Java Portlets
1. Portlet 是基于 Java 技术的 web 组件。 2. 专门的容器管理 Portlet 以及 portlet 生命周期。 3. Portlet用于生成动态内容。
1. Portlet 具有访问及存储持久性配置和自定义数据的方法。 2. Portlet可以访问用户概要信息。 Java
Portlet 容器
Portlet 容器是 Servlet 容器的扩展。Portlet API v1.0 基于
J2EE (Java 2 Platform, Enterprise Edition) v1.3。Portlet
容器和 portlet 符合 J2EE 规范所描述的运行环境的需求。 |
||||||||||||||||||||||||||||
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>"); }
}
|
下边是 Hello World portlet 的 portlet.xml 文件:
<?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>
|
BEA WebLogic Portal 团队积极投身于研究 JSR 168 的专家组。 您可以下载使用 Weblogic Portal 8.1
SP2 的 JSR168 完整实现过程。
有关 JSR 168 和 BEA WebLogic Portal 8.1 的更多信息,请参见:
dev2dev 上关于 BEA WebLogic Portal
的页面:
http://dev2dev.bea.com/products/wlportal81/index.jsp
BEA WebLogic Portal 的文档站点:
http://edocs.bea.com/wlp/docs81/index.html
BEA WebLogic Portal 新闻组:
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=WebLogic.developer.interest.portal&utag=
BEA WebLogic Portal 产品页:
http://www.bea.com/framework.jsp?CNT=index.htm&FP=/content/products/portal
JSR 168 主页:
http://www.jcp.org/en/jsr/detail?id=168
| 作者简介 | |
Alex Toussaint 是BEA Systems公司的高级产品经理。在为BEA效力的第一个5年中,他在WebLogic Portal团队中负责开发产品策略,并管理着几个领域,比如内容管理、门户联合、门户框架和新兴门户标准。 | |
