- JBoss Portal Server Development
- Ramanujam Rao
- 1185字
- 2021-05-21 20:13:06
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:

As we can see, the browser makes the request for a portal page, which is then passed to the portal container by the server that had originally received the request. The container determines the appropriate page and passes the request to it. The portal page identifies all the portlets contributing to it, and aggregates all the page fragments generated by each portlet. Each portlet independently follows its own life cycle and generates the final fragment. The combined page is then passed back to the container, which then passes the response back to the server. The server aggregates the information along with its own features, and returns the response to the browser, which formats the HTML for the user.
Portal specification and WSRP
JSR-168 and JSR-286 are Java Portlet Specifications that define the standard for the Java Portlet API. Like other specifications, the portlet API specification is intended for both portlet developers and portal server creators. Standardizing on a portlet API allows the creation of pluggable portlets that are independent of the portal server. Hence, the portlets created on one platform can be easily migrated to another.
The Web Services for Remote Portlets(WSRP) specification defines a protocol for creating and communicating with remote portlets. It is not intended to compete with the portlet specifications; instead, it facilitates web services based communication between portlets created using the specification. Because application integration is the primary function of portals, utilizing web services for integration can be an efficient mechanism.
Servlets and portlets
J2EE Servlets and Portlets share a lot of features. Both are Java-based web components, whose life cycles are managed by the container, interacting with browser clients, servicing requests, and responding to them. Both are also responsible for generating dynamic content to create the user interface of the web application. However, portlets differ from servlets in terms of scope and functionality in the following ways:
- Portlets are not accessible by a URL. Portlets are intended to be part of a page, as opposed to being independent pages.
- Browsers and web clients interact with portlets through the portal server. Portlets can neither set HTTP headers, nor be aware of the client URL.
- The portal server provides a customized subset of the request object to a portlet.
- Portlets only contribute a fragment of the HTML page that is eventually presented to the browser, and not the whole page. A portal server aggregates these fragments from various portlets to create a final page.
- Portlets come with certain modes and window states that make them function independently of the whole page behavior.
- Portlets have access to some specialized functionality that allows storage of states and preferences across requests and sessions.
The expectations from portals are different from traditional web sites. Hence, the portlet specifications have to be created independently of servlets.
However, this doesn't preclude portals from interacting with servlets. A portlet can effectively invoke any servlet, JSP, or a JSP tag, and leverage their functionality to fulfill its function.
- 中文版Photoshop入門與提高(CS6版)
- Word-Excel-PowerPoint 2010三合一從新手到高手(超值版)
- vtiger CRM Beginner's Guide
- 軟件定義數(shù)據(jù)中心:技術(shù)與實(shí)踐
- Word論文排版之道
- 中文版3ds Max 2016/VRay效果圖制作實(shí)戰(zhàn)基礎(chǔ)教程
- 從零開始:Photoshop CC 2019中文版基礎(chǔ)教程
- iPhone Applications Tune/Up
- 圖像處理中的數(shù)學(xué)修煉(第2版)
- 中文版3ds Max 2021完全自學(xué)教程
- AutoCAD 2016中文版完全自學(xué)手冊
- Apache Maven 3 Cookbook
- Object/Oriented JavaScript
- 中文版Photoshop CS6從新手到高手·全彩版
- SharePoint Designer Tutorial: Working with SharePoint Websites