Using Adrenaline Portlets to Energize Web Applications

by Peter Laird


Portlets have traditionally been confined to portal applications: You needed an application server running a portal container to view them. The new Adrenaline technology introduced in BEA WebLogic Portal 9.2 enables portlets to be surfaced in any Web application, without the need for a portal container. So now you can surface portlets from within your Struts or Spring application—or any other Web application.

Why is this important? Enterprises with widespread legacy Web applications have a costly task just maintaining the existing investment; adding new functionality is almost out of the question. It is often too risky to send a developer into a legacy application to add features because of the risk of destabilizing the existing code base. These Web applications become frozen in time as they cannot be updated to meet the changing needs of the users. Adrenaline helps in situations such as these; developers simply need to make minor extensions to the Web applications to render portlets.

In addition, many enterprises have adopted portal infrastructures to aid in managing application sprawl. Portals enforce componentized development and offers shared infrastructure such as security and application administration. While moving from custom Web applications to portals is often a goal, the effort can at times seem too costly. Here again, Adrenaline can help by easing the transition from Web applications to portals.

This article provides an introduction to Adrenaline and shows how to use the technology.

Introducing Adrenaline: Portlets without Portals

BEA WebLogic Portal 9.2, with the introduction of Adrenaline technology, formalizes the idea that portlets are standalone user interface components. Adrenaline provides support for rendering portlets outside of a portal framework. Any team that must support non-portal Web applications will benefit from this feature. Whereas the portlet component model formerly required adoption of a portal architecture throughout the enterprise, portlets can now be employed to surface user interface components in legacy Web applications, in new Web applications, and, of course, in portals.

Portlet containers provide a component model with many features, while at the same time supporting developers who already have a preferred technology such as Struts, JSF, and Java Pageflows. The portlet development model is a productive and feature-rich environment that enforces the development of user interfaces as portable components. By using Adrenaline, the enterprise can standardize on a consistent approach to Web user interface componentization for maximum reuse and minimum cost.

Additionally, Adrenaline uses Ajax to manage interactions with the portlet without page refreshes. This allows an Adrenaline portlet to be added to a page without the risk of interfering with the existing page logic. Adrenaline essentially operates in isolation on the page.

Energizing a Legacy Web Application

For IT, inserting new features into existing applications is sometimes too risky because any change could destabilize the existing code base. Adrenaline offers a compelling solution. By inserting a portlet onto a legacy page, a developer with little knowledge of the application can add features without destabilizing the application.

As an example, Figure 1 shows a stale legacy application rendered from static HTML Web pages:

Figure 1
Figure 1. The original legacy Web application rendered from static HTML pages

Figure 2 shows the same legacy page with a new portlet. The portlet was developed in isolation, and then using a simple technique, the portlet was deployed into the legacy Web application. The portlet developer didn't need to understand the legacy application at all.

Figure 2
Figure 2. The same static legacy application, now with a new portlet

The power of using a portlet development model to augment existing Web applications is hard to beat. Not only is it easy to add a portlet to a legacy Web application, that same portlet can be reused in any other Web application. Therefore, the portlet approach allows for simple improvements to legacy applications and it provides for a great reuse model.

Using Adrenaline

When surfacing a portlet in a Web application page, it is common to refer to the application that is providing the portlet as the producer. The term consumer then refers to the Web application page that is surfacing that portlet provided by the producer. When using Adrenaline, it is important to see that two applications are at work: the producer and the consumer. In the diagram below, the Web page is the consumer, and the WebLogic Server Web application is the producer.

Figure 3
Figure 3. A non-portal Web page that includes three portlets

You will see how Adrenaline expands the possibilities of where a portlet can be surfaced. But what types of Web applications can be producers and consumers of Adrenaline portlets? The table below shows the support for Adrenaline across various Web containers. The left column provides a list of containers, while the other columns detail the capabilities of each container, as discussed later in this article. Use this table as a reference as you learn about the various approaches of using Adrenaline:

Table 1. Adrenaline capabilities available across different containers

Container Consuming Adrenaline Portlets Producing Adrenaline Portlets
  IFrame Ajax Snippet Ajax JSP Tag  
Static Web Application
Apache, IIS
yes yes no no
Dynamic Web Application
CGI, ASP, Tomcat
yes yes no no
WebLogic Server Web Application yes yes no no
WebLogic Server Web Application
with Adrenaline
yes yes yes yes
WebLogic Portal Web Application yes yes yes yes

Note: The container column is listed in order from generic to specific. A WebLogic Server Web Application is a subtype of Dynamic Web Application. A WebLogic Server Web Application with Adrenaline is a subtype of WebLogic Server Web Application, and so on. Therefore, any capability ascribed to a container in this article is also available to any container below it in this table.


Three techniques can be used to make a legacy Web application into a consumer of Adrenaline portlets. Each technique provides a mechanism for inserting a portlet into an existing Web page in a Web application.

  • IFrame - the most portable technique, the portlet URL is rendered within its own IFrame on the Web page.
  • Ajax - a more advanced technique, the portlet is asynchronously rendered by the Adrenaline JavaScript library directly into the page text (via the DOM).
  • Ajax JSP Tag - for WebLogic Server Web applications, a convenient JSP tag has been included in Adrenaline.

Using these techniques, Adrenaline portlets can be surfaced in any HTML consumer Web application. This can include .NET, Ruby on Rails, PHP, static HTML, and, of course, Java Web applications.


The first step to using Adrenaline is to develop a portlet using WebLogic Portal 9.2. WebLogic Portal offers numerous options for developing portlets, including using Java Server Faces, Java Pageflows, standard JSP, or a number of other options. This portlet must then be deployed in a WebLogic Server 9.2 Web application with Adrenaline, at which point the Web application becomes a producer of the Adrenaline portlet. This producer Web application need not be a WebLogic Portal 9.2 Web application.

Pages: 1, 2

Next Page »