First, explain a few basic terms.
1) Portal
Portal is a Web application that typically has features such as personalization, single sign-on, content aggregation from different sources (aggregation), and an information system presentation layer. Aggregation refers to the operation of integrating content from different sources into a single Web page. A portal application can provide customized content to users through complex personalization configurations, and portal pages can contain different portlets to generate content for different users.
At the beginning of the Internet, user interaction with the web is usually a URL to a single static web site. With the use of applets, JSP and other technologies, more dynamic Web content shows up. But for web developers, the lack of cross-browser application implementation standards remains a big challenge for them. The emergence of the Portal solves the problem of aggregation of dynamic content and provides users with a collaboration-oriented aggregation platform.
IBM sees the portal portal as a next-generation Web-based desktop system that delivers e-commerce applications to various client devices through the Web. The portal provides site users with a single point of access to multiple types of information and applications. Regardless of where the information resides or what format it is, the portal gathers all the information in a satisfying, user-friendly way. A complete portal solution should give users easy access to every job they need to complete their tasks.
The extensible framework of IBM WebSphere Portal allows end users to interact with enterprise applications, people, content, and processes. They can personalize and organize their own web portal views, manage their own profiles, and publish and share documents. WebSphere Portal provides additional services such as single sign-on, security, content management, search and taxonomy (taxonomy), support for mobile devices, and site analysis.
2) Portlet
Portlets are Java-based Web Components that are managed by the Portlet container and the life cycle of the portlet is managed by the Porlet container. The Portal uses portlets as pluggable user interface components to provide a presentation layer for information systems. The WEB client interacts with the portlet through a request/response mechanism. Because of the user's configuration of the portlet, the content generated by the portlet differs.
IBM WebSphere Portal is a framework that allows users to insert new features or extensions (portlets). Portlets are applications in WebSphere Portal. Developing portlets is the most important task in a portal that acts as a window into the user's access to information and tasks.
3) Porlet Container
The Portlet container is responsible for running the portlet and providing the necessary operating environment for the portlet. The Portlet container contains Portlets and manages their lifecycles, while persisting the parameters of the portlet. The Portlet container receives and processes requests from the portal, runs the portlet, and finally generates dynamic content. It is important to note that the Portlet container does not aggregate multiple portlet-generated content, but rather that the portal is doing the work of aggregation.
Back to top of page
The relationship between 3.1.2 and Servlet
As defined by the servlet specification v2.3, the servlet is also a Java-based Web Component that is managed by the container to generate dynamic content. So what's the difference between a servlet and a portlet? Table 3-1 lists the similarities and differences between Servlets and portlets.
Table 3-1. Servlet and Portlet Comparisons
| Same point |
Different points |
| are Web Components based on Java technology |
The portlet generates only markup fragments (markup fragment), and the portal aggregates all Portlet markup fragments to get the complete portal page |
| are managed by a dedicated container |
Portlets are not directly bound to URLs |
| can dynamically generate content |
WEB clients need to interact with Porlet through the portal system |
| The life cycle of both has dedicated container maintenance |
Portlets have finer request processing, action requests, and display requests |
| Interact with the Web client through request/Response mode |
Portlets have predefined portlet modes (portlet mode) and window States (Windows state), indicating the Portlet's operational capabilities and the number of actual status of the portal page |
|
Portlets can exist on the same portal page in multiple places |
Table 3-2 lists the unique features of Portlets and Servlets.
Table 3-2. Features unique to portlets and Servlets
| Portlet |
Servlet |
| Portlets can access and store persisted configuration information and custom data |
The Servlet can set the character set encoding of the response |
| Portlets can access user profile information |
The Servlet can set the HTTP header in the response |
| Portlets have URL override capabilities to create hyperlinks in their content. This way, the portal server does not need to know the creation of links and actions in the page fragment. |
Servlet can correspond with URL |
| Portlets can store instantaneous data in a portlet session in two domains: application-level and portlet-Private domains |
|
Because of these differences, portlets and Servlets are two different components. But portlets have similarities with Servlets in configuration, class loading, Web applications, Web application lifecycle management, session management, and request distribution. Portlets, Servlets, and JSPs can be bundled in an extended web application called a portlet application. At this point, the Portlet, servlet, and JSP share the class loader, application context, and session. Portlets can invoke Servlets and JSPs through the request dispatcher, just as a servlet can invoke other Servlets and JSPs, allowing for seamless integration of portlets and Servlets.
The Portlet container is an extension of the servlet container, so regardless of how the Portlet container is implemented, the runtime environment assumes support for Servlet specification 2.3.
Back to top of page
3.1.3 Portal Page
As shown in Figure 3-1, the portlet generates fragments (fragment), and the portal typically adds a title, control buttons, and other decorative elements to the portlet window. Finally, the portal aggregates multiple portlet windows into a complete document, the portal page.
Figure 3-1. Component elements of the Portal page
The portlet runs in the Portlet container, and the container receives the content generated by the Porlet and passes it to the portal. The portal server is organized into a portal page and sent to the client device (such as a browser) for display. The build process for the Portal page is shown in Figure 3-2.
Figure 3-2. Portal page Generation Process
Java Portlet Specification Overview