Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Contents
What is a Portlet Comparison of Servlet and Portlet Portlet Architecture Portlet Lifecycle Portlet Features Portlet Modes Portlet Window States Portlet Container How to develop and deploy a Portlet
What is a Portlet
Web component based on Java Technology. A small window on a portal page. Pluggable user interface Components.
Example
Comparison (ctd..)
Differences: Servlets can provide complete web pages, whereas Portlets only provide fragments. Portlets only generate markup fragments, not complete documents. Portlets are not directly bound to a URL Web clients interact with portlets through a portal system Multiple instances of a single portlet can be placed onto the same page
Comparison
Architecture
Portlet Features
Portlet Modes
Portlet Container
Portlets are deployed in a Portlet container. The container can: Provides runtime environment for Portlets Manage life cycle of Portlets Provide persistent storage for storing Portlet preferences Cache the Portlets Receive requests from the Portal to execute requests on the Portlet Not responsible for contents aggregation
Write a Portlet Implement Portlet Interface Implement important methods init(), processAction(), doView(), doEdit(), doHelp(),render(), destroy() Compile
Configure Portlet Application and add the Portlet(s) to it Deployment descriptor portlet.xml Package the classes and deployment descriptor within a .war Portal servers: Pluto, Liferay, Jboss Portal, Exo (JSR 168)
References
http://www.javaworld.com/javaworld/jw-08-2003/jw0801-portlet.html?page=1 Sun JSR 168 Portlet: http://developers.sun.com/portalserver/reference/tech art/jsr168/pb_whitepaper.pdf Sang Shin article: http://www.javapassion.com/j2eeadvanced/WSRP4.p df