JBoss Portal Server Development - Ramanujam Rao - E-Book

JBoss Portal Server Development E-Book

Ramanujam Rao

0,0
31,19 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Enterprises need more than just basic services; they need value-creating entities, which are crucial for running a successful business. Portals offer tremendous value to enterprises, and JBoss Portal Server is a popular, feature-rich open-source server that provides a standards-compliant platform to host functionality that serves the diverse portal needs of an enterprise. Its primary strength lies in its ability to provide robust support for custom implementation of functionality using the JSR-168 portlet API.
This book is a practical guide for installing, configuring and building feature-rich portal applications using the latest JBoss Portal Server 2.7.0. It explains, with examples, how portals can be easily developed, personalized, secured and integrated with other external enterprise assets..
The book will equip you with everything you need to know about JBoss Portal Server to build a fully functional portal. Using it, you can quickly come up to speed with the features offered by the portal server and can start using it almost immediately to develop enterprise portal solutions such as corporate intranets, B2B, or B2C sites. The book will help you to quickly understand and build enterprise portals with rich features such as personalization, AJAX, single sign-on, Google widget integration, remote portlet integration, content management and more. Along with feature implementation, the book also provides enough details for developers to tune and customize the portal environment to best suit the platform needs.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Seitenzahl: 266

Veröffentlichungsjahr: 2009

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

JBoss Portal Server Development
Credits
About the Author
About the Reviewers
Preface
What this book covers
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code for the book
Errata
Piracy
Questions
1. Portals and Portal Servers
Portals
Why portals?
Types of portals
Function-based portals
Vertical portal
Horizontal portal
User-based portals
B2B portal
B2C portal
B2E portal
Portal servers
Portlets and portlet container
Constructing a view
Portal specification and WSRP
Servlets and portlets
Summary
2. Getting Started with JBoss Portal
JBoss portal server
Features
Technology and Architecture
Security and Single Sign On
Supported Standards
Portal and Portlet Container
Content Management System
Installing the server
Getting the software
System requirements
Installation
JBoss portal packaged with JBoss application server
JBoss portal binary without the server
Building JBoss portal from source
Configuration
Changing the context root
Changing the portal port
Setting email service
Configuring proxies
Working with the portal
Getting started
Creating our first portal page
Summary
3. Saying Hello with a Portlet
Portal page
JSR-168 and JSR-286 — Java portlet specification
Portal URL
Portlet modes
Window states
A Hello World portlet
Portlet development environment
Portlet package structure
Writing the code
Application descriptors
portlet.xml
portlet-instances.xml
sayhello-object.xml
web.xml
Building the application
Deploying the application
Accessing the page and portal URL
Summary
4. Managing the View
The Presentation tier in portals
Using Java Server Pages
Archive package structure with JSP
Writing the code
Portlet class
JSPs and portlet tags
Application descriptors
Building the application
Deploying the application
Using Java Server Faces
JSR -301 Portlet Bridge
Package structure with JSF
Application descriptors
Building the application
Deploying the application
Using JBoss Seam
Building a sample application: an intranet portal
Introduction
Creating the MyCompany portal
A JSP portlet
Summary
5. Personalizing Our Portal Experience
Personalization and customization
Personalizing the portal
Personalization models
User profile-based
Rules-based
Collaborative filtering
Personalized interface
Layouts
Creating layouts
Using the layout JSP tags
Configuring layouts
Themes
Defining themes
Configuring themes
RenderSets
Using RenderSets
Custom development
Modifying header.jsp
Creating new JSPs
Modifying tabs.jsp
Personalized content
Access-level based portlets
Preference-based portlets
Analytics-based portlets
Customizing the portal
Setting preferences
Internationalization and localization
Drag-and-drop content
Usability settings
Summary
6. Portals and AJAX
Rich user interfaces and AJAX
Asynchronous JavaScript and XML or AJAX
AJAX in JBoss portal
JSR-168 AJAX limitations
JSR-286 and AJAX
Developing an AJAX portlet
The front-end
The server-side portlet
Deployment
AJAX support for markup
Layout markup
Renderer markup
AJAX support for content
Drag-and-Drop
Partial content refresh
Portal object configuration
Portlet configuration
Constraints in implementing partial refresh
Inconsistent session attributes
Non-AJAX interaction
Considerations for AJAX implementations
Global variables
State management
Visual cues
Summary
7. Databases and Portal
Database use in portal
Hibernate
JBoss portal server using Hibernate
Hibernate configuration for portal features
Content management system database storage
Building portlets using Hibernate
A persistent portlet
Configuring and using Hibernate
Creating the persistent class
Setting up database
Creating the mappings
Configuring Hibernate
Creating the Data Access Object class
The Portlet class and configuration
Building and deployment
Summary
8. Managing Content in Portal
Content management systems
Adding content to portal
Adding content to portal pages
Editing content
The CMS portlet
CMS service configuration
Content storage configuration
100% database storage
100% filesystem storage
Mixed Storage
CMS Interceptors
Localization
CMS workflow service
Activation and configuration
Summary
9. Portal Security
Portal security
Portal objects security
Using the management console
Using configuration files
User security and access control
Authentication
Authorization
User and role management
The portal permission
The authorization provider
Making a programmatic security check
Configuring an authorization domain
LDAP configuration
Single sign-on
Identity management
Managing users using admin console
Identity portlets
Captcha support
Lost and reset passwords
jBPM-based user registration
Configuration
Identity management API
Content management system security
CMS security configuration
CMS super user
CMS security console
Summary
10. Web Services and Portlets
Remoting in portal servers
Web Service for Remote Portlets
WSRP actors
Portlet
Producer
Consumer
End user
Process flow
WSRP Use Profiles
Producer levels
Base
Simple
Complex
Consumer levels
Base
Simple
Medium
Complex
WSRP in JBoss portal
WSRP implementation support
Enabling remoting in portlets
Configuring WSRP producer
Producer configuration
Customization
Configuring WSRP consumer
Remote producer configuration using Admin portlet
Remote producer configuration using the WSRP producer descriptor
Managing consumer configuration
Instantiation of a remote portlet
Summary
11. Portlet Coordination and Filters
Going from JSR-168 to JSR-286
Portlet coordination and inter-portlet communication
Portlet events
Public render parameters
Portlet coordination in JBoss portal
JSR-168 inter-portlet communication
Coding listener and portlets
Configuring the listener and portlets
Service descriptor
Portal descriptor
Deploying portlets
Portlet events-based coordination
Creating and retrieving events
Configuring events
Deploying portlets
Public render parameter-based coordination
Coding public parameters
Configuring public render parameters
Deploying portlets
Additional JBoss coordination features
Implicit and explicit coordination
Explicit coordination configuration
Event wiring
Parameter binding
Alias binding
Portlet filters
Creating the filter
Configuring the filter
Mapping the filter
Deployment
Summary
Epilogue
Index

JBoss Portal Server Development

Ramanujam Rao

JBoss Portal Server Development

Copyright © 2009 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: January 2009

Production Reference: 1190109

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 978-1-847194-10-7

www.packtpub.com

Cover Image by Vinayak Chittar (<[email protected]>)

Credits

Author

Ramanujam Rao

Reviewers

Prabhat Jha

Russ Olsen

Senior Acquisition Editor

Rashmi Phadnis

Development Editor

Dhiraj Chandiramani

Technical Editor

Aanchal Kumar

Copy Editor

Sumathi Sridhar

Editorial Team Leader

Akshara Aware

Production Editorial Manager

Abhijeet Deobhakta

Project Team Leader

Lata Basantani

Project Coordinator

Leena Purkait

Indexer

Monica Ajmera

Proofreader

Dirk Manuel

Production Coordinator

Shantanu Zagade

Cover Work

Shantanu Zagade

About the Author

Ramanujam Rao is a software engineer, architect, and trainer specializing in building large-scale enterprise applications. He has over 13 years of experience in designing and developing complex web architectures, including portals, and helps enterprises in building scalable, distributed applications on the JEE platform.

He writes frequently on enterprise architecture, and actively consults in the field of information technology management, including technology platforms, technology strategy, and application delivery.

He has a B.S. in Electrical Engineering, an M.S. in Computer Science, and an MBA from Ohio State University. He currently lives and works in Columbus, OH, USA.

I'd like to thank my wife, Bharathi, and my daughter Gitanjali, for their constant support and for managing things during my long absences in the course of writing this book. I'd also like to acknowledge our parents, whose sacrifices and encouragement have always been part of everything I do.

I'd like to acknowledge the technology community in general, whose shoulders I stand on, including the folks at JBoss portal, and my colleagues at Nationwide Insurance.

Finally, a big thanks goes to the technical reviewers Russ and Prabhat, whose feedback was invaluable, and the entire Packt editorial team for their dilligence in getting the book out in a great shape.

About the Reviewers

Prabhat Jha works as Senior Engineer at JBoss, a division of Red Hat Inc. He has been working on JBoss Portal for the past two years, primarily on its integration aspects, performance, and scalability. He is also a contributor to PortletSwap (http://www.jboss.org/portletswap ). He holds a Masters degree in Mathematics from the University of Texas in Austin, and has been working with Java and JEE for the past five years. He evangelizes portal technology at different Java User Groups (JUG).

Russ Olsen has been writing programs for over 25 years. During that time Russ has built systems in such diverse areas as low-level hardware control, inventory management and GIS, using everything from assembly language to Ruby. Active in both the Java and Ruby communities, Russ is the author of Design Patterns In Ruby.

Dedicated to my parents, Narsingh and Bharathi Rao

Preface

Enterprises need more than just basic services; they need value-creating entities, which are crucial for running a successful business. Portals offer tremendous value to enterprises, and JBoss Portal Server is a popular, feature-rich open-source server that provides a standards-compliant platform for hosting functionality that serves the diverse portal needs of an enterprise. Its primary strength lies in its ability to provide robust support for custom implementation of functionality using the JSR-168 portlet API.

This book is a practical guide to installing, configuring, and using JBoss Portal Server. It explains, with examples, how to easily build feature-rich portals using JBoss. As you move further on, you will learn to personalize your portals and add new features to them. This book will equip you with everything you need to know about JBoss Portal Server to build a fully-functional portal. It will help you to quickly understand and build enterprise portals with rich features, such as personalization, AJAX, single sign-on, Google widget integration, remote portlet integration, content management, and more. Along with feature implementation, the book will also provide developers with enough detail to be able to tune and customize the portal environment to best suit the platform needs.

What this book covers

Chapter 1 reviews portals, their functions, and their values. It talks about portal servers and the specifications that govern the creation and management of portals on the J2EE platform. Portal servers go beyond serving custom content and provide a feature-rich set of robust pre-built functions that take away the need to create certain fundamental sets of features from scratch each time. This chapter shows that, by removing the development efforts behind creating such features, portal developers can now spend their time and money on developing business functions.

Chapter 2 talks in detail about the installation process of JBoss portal, with an emphasis on the differences and caveats for the various installation types offered, depending on the usage scenarios. A simplified installation and deployment process facilitates faster implementation and fewer problems, as demonstrated by almost immediate creation and management of pages on the platform.

Chapter 3 goes a bit deeper into JBoss portal server and explains portlets better by creating a simple portlet application. It goes through the complete life cycle from code creation to deployment. This overview tour gives you a good idea of the major components that are required to create a functional portlet.

Chapter 4 reviews the various options that are available to effectively manage the presentation of portlets using technologies such as JSP, JSF, and so on. It shows a few examples of each one of them. To understand the concepts better, a portal application is created from scratch and a custom portlet, created with JSP-based view is added to this new application.

Chapter 5 reviews how the power of portals can be extended by facilitating features such as customization and personalization. It further extendeds our example portal to include custom layouts, themes, and other personalization features. It also shows how we can personalize a page and offer the users options for controlling the contents on the page.

Chapter 6 shows how JBoss portal blends the dynamism and rich functionality offered by AJAX with its strong portal architecture, to provide users with choices for developing highly-functional portal applications. It also discusses the limitations of the current specification and walks through an example that shows how easy it is to develop and deploy AJAX-based portlets.

Chapter 7 talks about how Hibernate, a very popular ORM tool, is used internally by JBoss applications, and how applications can integrate database support into portlet applications by using Hibernate.

Chapter 8 elaborates upon a simple but robust content management system provided by the JBoss portal that is sufficient for most of the needs for a portal application. Using interceptors, CMSAdmin, and CMS Portlets, the user can develop a functionality that helps to effectively manage and deliver content. This chapter extends our example further, to add some new content, and then edit it. It also shows how easy it is to add, edit, and manage content in the portal.

Chapter 9 discusses the various aspects of security as they relate to JBoss portal server and its functional components — the portal objects. JBoss portal allows a fine-grained level of control over portal objects such as portal instances, pages, and portlets. Security is an important function of an application. JBoss portal offers a varied set of options that allow the building of highly secure enterprise applications on the portal server.

Chapter 10 discusses the basics of remoting portlets before it goes into a few implementations using some real-world examples. It talks about how easily the portlets can be exposed as remotely available services, and how remote services can be consumed relatively effortlessly.

Chapter 11 talks about some of the features specified by the new portlet specification, such as portlet co-ordination, and filters introduction. It tells us how Portlet 2.0 provides a comprehensive set of options for performing robust portlet coordination by using events, as well as public parameters that tremendously increases the capabilities of portals and portlets by opening up possibilities for integrating not only within the application, but also with other applications within the enterprise.

Who this book is for

This book is for portal developers, administrators, designers and architects working on the Java platform, who want to build web portal solutions. The book doesn’t expect an expert knowledge of portal or JEE technologies, but does presume a basic understanding of web technologies and the Java/JEE platform. However, the concepts are lucid enough that any competent developer can easily find immediate value in the book, and start creating dynamic portals.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "We can include other contexts through the use of the include directive."

A block of code will be set as follows:

<web-app> <context-param> <param-name> org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL </param-name> <param-value>true</param-value> </context-param> </web-app>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be set in bold:

<script type="text/javascript"></script> <!-- inject the theme, default to the Renewal theme if nothing is selected for the portal or the page --> <p:theme themeName="renewal"/> <!-- insert header content that was possibly set by portlets on the page --> <p:headerContent/>

New terms and important words are introduced in a bold-type font. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "Clicking on the Configure Dashboard link will take us to the page which provides interface to design our dashboard".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book — what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an email to<[email protected]>, making sure that you mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note via the SUGGEST A TITLE form on www.packtpub.com, or send an email to <[email protected]>.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code for the book

Visit http://www.packtpub.com/files/code/4107_Code.zip to download the example code.

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books — maybe a mistake in text or code — we would be grateful if you would report this to us. By doing so you can save other readers from frustration, and help to improve subsequent versions of this book. If you find any errata, report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide the location address or website name immediately so we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with some aspect of the book, and we will do our best to address it.

Chapter 1. Portals and Portal Servers

A portal in the true sense of the word, is a common entrance to a destination. Portals on the Internet, also called web portals, are a single entry point to an application that provides varied features such as personalized and aggregated content, search capabilities, and customized applications.

Portals have gained significant popularity as a means for generating business values through efficient marketing, sales, and services, as well as being a channel for providing timely, useful, and accurate information and services to users.

In this chapter, we will review the basics of web portals, their types, differentiating characteristics, and uses.

Later in the chapter, we will also talk about portal servers, their types, applications architecture, and governing specifications. Portlets are independent pieces of functions that constitute a portal application. We will also briefly discuss how these basic building blocks help in providing the overall value for a portal application.

Portals

Today, information from web sites is not only served through static web sites, but also through focused and customized gateways targeted at a specific customer segment. Towards that goal, portals have gained significant popularity in the past few years as an efficient, convenient, and effective way of organizing, aggregating, and customizing information for users. Portals are particularly effective in enterprises, where the challenges of information management and delivery are overwhelming. They can offer an approach to leveraging existing IT investments and seamlessly integrating diverse functionality through a single, user-friendly channel.

Broadly, the features offered by portals are as follows:

Content Management and Aggregation: Content can be effectively and efficiently managed to provide a single consistent view of the enterprise to a user. Disparate enterprise applications serving information through multiple outlets can be aggregated into a single channel.Personalization and Customization: When content is aggregated and users are served through a single channel, personalizing and customizing the content provides added usability. Storing and remembering preferences gives an incentive for users to build a portal that best serves their time and interests.Search: A portal, being the entrance to all applications and content, is almost expected to provide search functionality. Portals have varying levels of integration with search functionality across content in the enterprise. Portals can either come with limited search capabilities built into them, or they can provide easy hooks to other standalone search engines that are already available in the enterprise.Seamless Authentication: Authentication, single sign-on, and authorization are various techniques to control access to applications. When users access applications independently, they are required to provide credentials separately for each application. When a portal integrates all these applications, it also provides an easy way to manage credentials beyond a single application, seamlessly allowing access to other enterprise applications without logging in again. This results in better usability and decreased exposure to security threats.Collaboration: This is a feature that has gained popularity in the recent years. A single platform for all enterprise applications usually results in better collaboration among various application owners. However, with growing interest in social networking and collaborative efforts, portals are now increasingly offering added features as a part of their value-added set. Having all of the users residing on a single platform provides a great opportunity for the portal to facilitate easy information exchange and collaboration between the users.

Why portals?

Portals have gained acceptance in the enterprise due to their capability to streamline and organize diverse applications through a single channel. The productivity gains experienced by an employee, customer, or a partner clearly provide immense functional value to an enterprise, due to features such as easy access to a wide array of enterprise resources, consolidated search capability and content management. Similarly, enhanced user experience through customized content, persistent preferences, and single/seamless sign-on access result in satisfied users.

Due to the need to consolidate applications and content across the enterprise, portals provide subsidiary benefits of aligning business units in terms of the applications they create and the content they generate, with a single customer/user view.

Some of the benefits of having portals are listed here:

Real-time management of consistent and trusted content along with timely publication, using a well controlled workflow.Efficient business processes with effective synergies.A single channel view of enterprise data and content through aggregated search capabilities.Enhanced communications between users and the enterprise through timely and relevant publication of information and use of a collaboration toolset. Employees, partners, and customers can now depend on a single channel to get a view of the enterprise and its functions, instead of having to refer to multiple outlets.Significant user retention and continued use of the channel due to strong personalization and usability features.Lower the total cost of ownership, by using open source software and increase the return on investments through improved visibility, productivity, and process efficiency.

Types of portals

Portals can be categorized in many ways. However, the most logical way of classifying them is based on the functionality they provide, and the users they cater to. Function‑based categorization focuses on the former, while user-based categorization focuses on the latter.

Function-based portals

Based on the functionality offered by portals, they can be classified as vertical portals or horizontal portals. These include both portals offered within the enterprise and portals that provide standalone applications on the Internet.

Vertical portal

Vertical portals, also called Vortals are the types of portals that are built to provide a full-stack implementation of single business functionality. All of the sub-elements of a vertical portal are built to provide different features of a single business function. Vertical portals are very popular among electronic and web-based business web sites.

Web-based business application users prefer a feature-rich application with easy access to functionality and a productive user experience. Vertical portals try to provide all possible features to a user in the most efficient way, centered around the business function, thus making the experience of doing business mutually valuable to both the users and the business.

Web sites offered by brokerage houses, medical/health services, and so on, are almost always vertical portals, where their customers are provided with various services related to their businesses. As seen in the following example, the business uses a vertical portal to provide all the services related to its business to the user through a single channel. The various page segments are independent functionalities, but they all are a part of the offerings of the same business function.

Horizontal portal

Horizontal portals offer a broad set of functions that are not aligned to a single scope, function, or capability. The idea here is to provide users with a set of aggregated information from various disparate sources based on some loosely defined categories. Each individual portal segment is unrelated to the other, and each operates independently in terms of content, scope, and function. Horizontal portals are typically built to cater to a broader audience that has diverse interests and preferences. This is different from vertical portals, which are built for a specific audience with a focused scope.

Web sites such as iGoogle, Yahoo!, and so on, are prime examples of horizontal portals. As seen in the following screenshot, the horizontal portal provides functions from various unrelated sources, but together, they meet the diverse needs of the user.

User-based portals

User-based classification is a different way of looking at portals, and here, portals are categorized based on the type of users who use the portal. These users can be other businesses, customers, or employees. Hence, we have new sub-categories such as B2B(Business to Business), B2C(Business to Consumer), and B2E(Business to Employee).

B2B portal

This type of portal is built for interaction with other businesses, as opposed to direct customers. A B2B portal facilitates activities between businesses that are a part of their business workflow. Examples of these are verifications, transactions, approvals, reports, and so on, all without manual intervention. Some good examples are companies that offer EDI services to others businesses, who then retrieve the data as and when required. Logistics management in businesses leverages such B2B services for activities such as order processing, fulfillment, and so on. B2B portals are usually used by businesses as a method of servicing their customers, and are less reliant on personalization and user interface aspects, when compared to other portal types.

With the increasing popularity of the Internet-based transactions, improved reliability, higher bandwidth, and so on, more and more businesses are, today, looking at reducing construction costs and expanding B2B portals to serve their business customers, who in turn, are constantly looking for ways to optimize their processes through automation.

B2C portal

These are the most common type of portals, and encompass pretty much all e‑commerce web sites that deal with customers directly. Examples of these portals are amazon.com, walmart.com, and so on. Instead of software systems and businesses interacting with the portal, a B2C directly interacts with the end customers, and hence, personalization, user interface, and user experience are of significant importance if the business wants to attract and retain its customers.

B2E portal

This type of portal can also be termed as an intranet portal; a B2E portal is built by a company or a business as a source of information and services for the exclusive use of internal company employees. Unlike a corporate intranet static web site, which is very generic in terms of its content and audience, a B2E portal is built to offer tailored information to an employee depending, typically, on his or her position, role, and location in the organization. Examples of the information and services provided by a B2E portal are: vacation reporting, performance summary, time management, resource ordering, pay information, and any specific — possibly sensitive — notifications.

Portal servers

Portal servers are software implementations of portal functionalities. They come either as standalone applications, tightly integrated with the application server they are built on, or they come as separate applications that can be deployed on an application server of choice. In this book, we will use the word portal to indicate a portal server.

A typical enterprise portal architecture is depicted in the following figure:

Fundamentally, today's enterprise portals can be viewed as aggregators of structured and unstructured data, which provide a consistent view to the end user. In our case, the structured data is represented by the RDBMS, and the unstructured data is depicted as XML or RSS feeds. Apart from data, portals also integrate with enterprise services.

As seen in the previous figure, the major components of a modern portal architecture are as follows:

User Interface: This is the interaction layer with the client and is responsible for handling HTTP requests, generating appropriate responses, and aggregating content to create a single page.Portlet Integration: Portlets are pluggable, independently deployable, and executable pieces of functionality that help constitute a web page served from a portal. This is the core of the services provided by a portal and plays the important function of managing the life cycle and behavior of the portlets.Content Management and Publishing: This component is responsible for providing functionality to edit content, manage workflow, and schedule publication. The content is provided from repositories either internal or external to the portal. External content also includes data feeds.Security: Integrated components provide authentication and single sign-on features using enterprise registries.Integration Interfaces: These interfaces facilitate easy integration with other external resources, services, and applications. Given that a part of a portal's role is aggregation of various enterprise systems, having strong integration features with support for components and protocols adds a definite value.

Portals provide their differentiating functions by leveraging their core components and integrating with other external entities, such as databases, services, search engines, and enterprise applications. There are many popular portal server implementations in the industry today, providing a diverse set of features and implementing specifications to varying degrees. Examples of these are IBM Websphere Portal Server, BEA Portal, LifeRay, and JBoss Portal Server.

Portlets and portlet container

Portals are implemented in various technologies. In this book, we will focus on J2EE technology and portal implementation on that platform.

As with any other API or feature in J2EE, portal and portal server implementations are governed by commonly-agreed industry standards and specifications. JSR-168 and JSR-286, also called the Portlet Specifications, govern the standards for portal technology on the J2EE platform. Before we go further into the portal server architecture, let us review some terminology.

The components of this figure are described here:

Portal: This is a web application that runs on an application server, hosts the presentation layer, and provides foundational services such as single sign-on, personalization, content aggregation, and so on.Portlet: A portlet is Java-based, built to specification, independent, and a self‑contained piece of functionality that contributes to a portal page and leverages the foundational functionality provided by the portal. A portlet generates its relevant page fragment that, along with other portlets, constitutes the user interface of a portal page. A browser interacts with each portlet through the portal, where the requests are processed by the portlet before returning the response again through the portal.Portal Page: This is a web page that aggregates portlets into a single HTML page, which the portlet container compiles and sends back to the browser client.Portlet Container: A portlet container manages the life cycle of portlets and provides them with the appropriate runtime environment. The container stores the preferences for each portlet and works with the portal to ensure effective request/response communication to and from portlets. It only deals with the portals' behavior and their mutual communication. Aspects such as content aggregation are delegated to the higher portal.

Constructing a view

Let us look at an example of how these components are used. The following figure shows a high-level view of how a portal processes a request, and the specific role of the components of the portal: