Portal Servlets
A portal servlet is a Java servlet that runs on the portal web server. It intercepts a user request for an HTML page, retrieves the requested page, envelopes the page with additional content, and then sends the resulting page to the user’s browser. It enables the portal to integrate content from a wide variety of sources and present the content on a single page in a coherent, consistent fashion.
The portal servlet performs these functions:
-
Retrieves user-requested content.
The content can be either target content, such as a PeopleSoft application page, for display in the large target region of the browser, or content for the smaller-sized pagelets.
Note:
Portal servlets do not accept HTTP PUT requests from clients. They accept only HTTP GET or POST data from clients. If the portal servlet is sent a PUT request, a 405 error page appears.
See World Wide Web Consortium, Hypertext Transfer Protocol — HTTP/1.1.
-
Provides a consistent user interface.
The portal servlet checks properties associated with each content reference, including the name of a portal template. When a user accesses content through the portal, the portal servlet wraps the target page with the portal template specified in the content reference. This template provides a consistent user interface.
-
Ensures that PeopleSoft-specific tags are processed correctly.
Developers create portal pages using a template-based layout system. In addition to traditional HTML tags, templates can contain PeopleSoft-specific tags that a normal browser cannot interpret. The portal servlet can interpret these PeopleSoft-specific tags when constructing templates, and can interpret any other HTML content, at runtime. The portal servlet then sends the resulting page to a browser as a single HTML document.
The portal servlet's behavior changes slightly depending on whether it's handling page-based or frame-based templates.
Page-Based Template Handling
For page-based templates, the portal servlet assembles pages for the browser and ensures that all URL references in the HTML on the assembled pages are referenced back to the portal servlet itself.
The portal servlet receives user requests for content and then constructs a single, complete HTML page for the user’s browser by combining the requested content with the appropriate portal template. This process is called page assembly. The portal servlet uses a template to incorporate the contents of the requested page into the context of the site (headers, navigation, and so on). Each content reference can be associated with a template in the portal registry. The template tells the portal servlet what URLs to combine and how to arrange them in the user’s browser.
Note:
The portal servlet uses relative URLs. The portal servlet performs URL rewriting (serves as a proxy) only when the URL is generated by an external system or a PeopleTools release prior to 8.4.
Pages that the portal servlet assembles for the browser might point to numerous other web pages from different sources on the internet. Because the user’s request goes through the portal servlet, the servlet must ensure that requests for content can be fulfilled during the page assembly process. In some cases, each URL in the HTML document assembled by the portal servlet must be rewritten to reference the portal servlet, not the originally requested URL. This process of redirecting URLs so that they point to the portal servlet is called proxying. Nevertheless, the portal servlet does not function as a reverse proxy server.
Frame-Based Template Handling
For a frame-based template, the portal servlet updates the src tags in the frameset with the target content before sending the page to the browser.
The portal servlet inserts a URL into each frame in the src tag and sends the page to the browser, rather than retrieving documents for the browser, as it does with page-based templates.
iFrame-Based Template Handling
For an iframe-based template, the portal servlet updates the src tags for each inline frame (iframe) element in the document with the target content before sending the page to the browser. The portal servlet inserts a URL into each frame in the src tag and sends the page along to the browser, rather than retrieving documents for the browser, as it does with page-based templates.
Portal Servlet Setup
A portal servlet must be set up properly on a web server before the portal can service user requests. The web server and portal servlet environment should be configured and tested during the installation of PeopleSoft applications.
See PeopleSoft 9.2 Application Installation for your database platform.