Java
TM
Portlet Specification
Version 2.0
Send comments about this document to: jsr-286-comments@jcp.org
5
10
January 25, 2008
Stefan Hepper (sthepper@de.ibm.com) 15
Java
TM
Portlet Specification, version 2.0 (2008-01-11)
2
Java(TM) Portlet Specification ("Specification") Version: 2.0
Status: Final, Specification Lead: IBM Corp.
Copyright 2008 IBM Corp. All rights reserved.
IBM Corporation (the “Spec Lead”), for the JSR 286 specification (the “Specification”),
hereby grants permission to copy and display the Specification, in any medium without 5
fee or royalty, provided that you include the following on ALL copies, or portions
thereof, that you make:
1. A link or URL to the Specification at this location:
http://www.jcp.org/en/jsr/detail?id=286 10
2. The copyright notice as shown herein.
The Spec Lead commits to grant a perpetual, non-exclusive, worldwide, non sub-
licensable, non-transferable, fully paid up license, under royalty-free and other reasonable 15
and non-discriminatory terms and conditions, to certain of their respective patent claims
that the Spec Lead deems necessary to implement required portions of the Specification,
provided a reciprocal license is granted.
THE SPECIFICATION IS PROVIDED "AS IS," AND THE SPEC LEAD AND ANY 20
OTHER AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-
INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SPECIFICATION
ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF 25
SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. THE SPEC LEAD AND ANY
OTHER AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
ANY USE OF THE SPECIFICATION OR THE PERFORMANCE OR 30
IMPLEMENTATION OF THE CONTENTS THEREOF.
The name and trademarks of the Spec Lead or any other Authors may NOT be used in
any manner, including advertising or publicity pertaining to the Specification or its
Java
TM
Portlet Specification, version 2.0 (2008-01-11)
3
contents without specific, written prior permission. Title to copyright in the Specification
will at all times remain with the Authors.
No other rights are granted by implication, estoppel or otherwise.
5
Java
TM
Portlet Specification, version 2.0 (2008-01-11)
5
Contents
Java
TM
Portlet Specification................................................................................................ 1
PLT.1 Preface .................................................................................................................. 13
PLT.1.1 Additional Sources.......................................................................................... 13 5
PLT.1.2 Who Should Read This Specification............................................................. 13
PLT.1.3 API Reference................................................................................................. 14
PLT.1.4 Other Java™ Platform Specifications............................................................. 14
PLT.1.5 Other Important References............................................................................ 14
PLT.1.6 Terminology ................................................................................................... 15 10
PLT.1.7 Providing Feedback ........................................................................................ 15
PLT.1.8 Acknowledgements V 2.0............................................................................... 15
PLT.1.9 Acknowledgements V 1.0............................................................................... 16
PLT.2 Overview............................................................................................................... 17
PLT.2.1 What is a Portal?............................................................................................. 17 15
PLT.2.2 What is a Portlet?............................................................................................ 17
PLT.2.3 What is a Portlet Container? ........................................................................... 17
PLT.2.4 An Example .................................................................................................... 18
PLT.2.5 Compatibility .................................................................................................. 18
PLT.2.6 Major changes introduced with V 2.0............................................................. 18 20
PLT.2.6.1 Clarifications that may make V1.0 Portlets Non-compliant.................... 19
PLT.2.6.2 Changes to the Programming Model ....................................................... 19
PLT.2.6.3 List of all Changes in the Specification ................................................... 20
PLT.2.6.4 List of all API changes............................................................................. 24
PLT.2.7 Relationship with Java 2 Platform, Standard and Enterprise Edition............. 27 25
PLT.3 Relationship with the Servlet Specification.......................................................... 29
PLT.3.1 Bridging from Portlets to Servlets/JSPs ......................................................... 31
PLT.3.2 Using Servlet Application Lifecycle Events................................................... 31
PLT.3.3 Relationship Between the Servlet Container and the Portlet Container ......... 32
PLT.4 Portlet Concepts.................................................................................................... 33 30
PLT.4.1 Portlets ............................................................................................................ 33
PLT.4.2 Embedding Portlets as Elements of a Portal Page .......................................... 33
PLT.4.2.1 Portal Page Creation ................................................................................ 34
PLT.4.2.2 Portal Page Request Sequence................................................................. 35
PLT.4.3 Portlets and Web Frameworks........................................................................ 35 35
PLT.5 The Portlet Interface and Additional Life Cycle Interfaces.................................. 37
PLT.5.1 Number of Portlet Instances ........................................................................... 37
PLT.5.2 Portlet Life Cycle............................................................................................ 37
PLT.5.2.1 Loading and Instantiation ........................................................................ 38
- 1
- 2
前往页