Skip Headers
Oracle® Fusion Middleware Administrator's Guide for Oracle WebCenter Portal
11g Release 1 (11.1.1.6.0)

Part Number E12405-18
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

25 Managing Oracle WebCenter Portal's Pagelet Producer

Oracle WebCenter Portal's Pagelet Producer (previously called Oracle WebCenter Ensemble) provides a collection of useful tools that facilitate dynamic pagelet development and deployment. The Pagelet Producer proxy provides users with external access to internal resources including internal applications and secured content. Using the Pagelet Producer, you can expose WSRP and Oracle JPDK portlets and OpenSocial gadgets as pagelets for use in any web page or application.

This chapter describes how to register, edit and deploy pagelets using the Pagelet Producer Administrative Console.

This chapter includes the following sections:

Audience

The content of this chapter is intended for Fusion Middleware administrators. For more information, see Section 1.13, "Oracle WebCenter Portal Administration Tools."

25.1 About the Pagelet Producer

This section is an introduction to Pagelet Producer concepts and features and includes the following topics:

25.1.1 Key Concepts

The following key concepts are useful when working with the Pagelet Producer:

  • The Pagelet Producer Console is a browser-based administration tool used to create and manage the various objects in your Pagelet Producer deployment. From the Console you can register web applications as resources and create pagelets, manage proxy and transformation settings, and more.

    The Pagelet Producer Console is accessible through any web browser at the following URL: http://<host_name>:<port_number>/pagelets/admin.

    Any user with the 'Admin' role on the host application server can access the Pagelet Producer Console. To grant administrative access to the Pagelet Producer Console to users without administrative access to the application server, use the 'EnsembleAdmin' role.

    The Pagelet Producer Console can also be launched in accessible mode at: http://<host_name>:<port_number>/pagelets/accessible.

  • Resources are core objects used to register applications within the Pagelet Producer, including stand-alone web applications, Portlet Producers and OpenSocial containers. Creating a resource allows the proxy to map internal applications to external URLs, manage authentication, and transform applications. Registering a web application as a Pagelet Producer resource allows you to do the following:

    • Proxy internal web applications to external addresses.

    • Manage authentication, both at the proxy level and at the resource level.

    • Transform proxied web applications, including URL rewriting.

  • Pagelets are sub-components of a web page accessed through the Pagelet Producer that can be injected into any proxied application. Any application on a Pagelet Producer resource that returns markup can be registered as a pagelet, which can then be displayed in Oracle WebCenter Portal, Spaces, or any web application.

    A pagelet is a reusable user interface component similar to a portlet. While portlets were designed specifically for portals, pagelets are designed to run on any web page. Any HTML fragment can be a pagelet. Pagelet developers can create pagelets that are parameterized and configurable, dynamically interact with other pagelets, and respond to user input using Asynchronous Javascript and XML (AJAX) patterns.

Pagelet Producer registration is dynamic. Additions and updates to existing producers are immediately available; in most cases, it is not necessary to restart the WebCenter Portal application or the managed server.

Note:

In the current release, only a single administrator can modify Pagelet Producer administrative settings at any given time. Concurrent edits will result in only one edit succeeding. However, data integrity will always be preserved.

25.1.2 Support for WSRP and Oracle JPDK Portlets

Using the Pagelet Producer, you can expose WSRP and Oracle JPDK portlets as pagelets for use in any web page or application.

After setting up the Pagelet Producer as described in Section 25.2, "Registering the Pagelet Producer," follow the steps below to import WSRP or Oracle JPDK portlets:

  1. Register the portlet producer with the Pagelet Producer as described in Section 25.9, "Registering WSRP and Oracle JPDK Portlet Producers."

  2. This automatically creates a resource and pagelets in the Pagelet Producer Console based on the portlet definitions for the producer. For details on the resource settings, see Section 25.4, "Creating Resources."

  3. To modify the imported resource or the associated pagelets, you must make a copy of the imported resource; for details, see Section 25.9.3, "Using WSRP and Oracle JPDK Portlets."

25.1.3 Support for OpenSocial Gadgets

Using the Pagelet Producer, you can expose OpenSocial gadgets as pagelets for use in any web page or application.

After setting up the Pagelet Producer as described in Section 25.2, "Registering the Pagelet Producer," follow the steps below to import OpenSocial gadgets:

  1. Define the OpenSocial container as described in Section 25.3.6, "OpenSocial Settings."

  2. Create an OpenSocial resource in the Pagelet Producer Console as described in Section 25.4, "Creating Resources" and Section 25.4.3, "Configuration Pages for OpenSocial Resources (OpenSocial Gadget Producers)."

  3. Create pagelets for OpenSocial gadgets as described in Section 25.5, "Creating Pagelets." The Pagelet Producer Console allows you to import gadget metadata from OpenSocial to populate the pagelet settings.

25.1.4 Support for Oracle WebCenter Interaction Portlets

The Pagelet Producer can be used as a portlet provider for Oracle WebCenter Interaction. There are several configuration pages that allow you to define CSP settings for use with Oracle WebCenter Interaction:

  1. Configure the Pagelet Producer settings for use with the Oracle WebCenter Interaction Credential Mapper, SOAP API service and image service, see the CSP Settings in Section 25.3, "Configuring Pagelet Producer Settings."

  2. Set up the Pagelet Producer's connection to the server hosting the portlet code by creating a CSP resource as described in Section 25.4, "Creating Resources."

  3. Create pagelets for the Oracle WebCenter Interaction portlets as described in Section 25.5, "Creating Pagelets."

25.2 Registering the Pagelet Producer

This section describes how to register and configure the Pagelet Producer using Fusion Middleware Control and WLST commands. This section includes the following subsections:

25.2.1 Registering the Pagelet Producer for WebCenter Portal Applications Using Fusion Middleware Control

To register the Pagelet Producer:

  1. Log in to Fusion Middleware Control and navigate to the home page for your WebCenter Portal application. For more information, see:

  2. Do one of the following:

    • For the Spaces application - From the WebCenter Portal menu, choose Register Producer.

    • For Framework applications - From the Application Deployment menu, choose WebCenter Portal, then Register Producer.

  3. Enter connection details for the Pagelet Producer (Table 25-1).

    Table 25-1 Pagelet Producer Connection Parameters

    Field Description

    Connection Name

    Enter a unique name to identify this Pagelet Producer instance within the WebCenter Portal application. The name must be unique across all WebCenter Portal connection types. The name specified here appears in Composer under the Mash-ups > Pagelet Producers folder (by default).

    Producer Type

    Select Pagelet Producer.

    Server URL

    Enter the URL of the Pagelet Producer. The URL must include a fully-qualified domain name. Use the following syntax:

    <protocol>://<host_name>:<port_number>/pagelets/

    For example:

    http://myhost.com:7778/pagelets/

    If pagelets contain secure data, the registered URL must use the https protocol. For example:

    https://myhost.com:7779/pagelets/

    The context root can be changed from /pagelets/ if necessary; for details, see Section 25.3, "Configuring Pagelet Producer Settings."

    Note: In Spaces, if the Pagelet Producer URL is protected by OAM, the URL to the pagelet catalog must be excluded (mapped directly without access control), or the catalog will appear to be empty when using REST. The pagelet catalog URL is http://<host_name>:<port_number>/ pagelets/api/v2/ensemble/pagelets


  4. Click OK. The new producer appears in the connection table.

25.2.2 Registering the Pagelet Producer for WebCenter Portal Applications Using WLST

Use the registerPageletProducer command to register a Pagelet Producer for your WebCenter Portal application. For command syntax and examples, see the section "registerPageletProducer" in the Oracle Fusion Middleware WebLogic Scripting Tool Command Reference.

You can also use WLST to list or edit the current connection details.

For information on how to run WLST commands, see Section 1.13.3.1, "Running Oracle WebLogic Scripting Tool (WLST) Commands."

25.2.3 Configuring the Pagelet Producer Service

This section describes how to set up the Pagelet Producer for use as a service by Oracle WebCenter Portal using the Oracle Configuration Wizard.

For information about developing and deploying pagelets, see the section "Creating Pagelets with Oracle WebCenter Portal's Pagelet Producer" in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter Portal.

To set up the Pagelet Producer as a WebCenter Portal service:

  1. Launch the Configuration Wizard (Oracle Fusion Middleware > Oracle WebLogic Server > Tools > Configuration Wizard).

  2. Select Create a new WebLogic Domain. Click Next.

  3. Select Base this domain on an existing template and select the Pagelet Producer domain template. Confirm that the template location is correct and click Next.

  4. Complete the domain configuration wizard. For details, see the online help.

All post deployment connection configuration is stored in the Oracle Metadata Services (MDS) repository. For more information, see Section 1.3.5, "WebCenter Portal Configuration Considerations." For detailed information about MDS, see the chapter "Managing the Oracle Metadata Repository" in the Oracle Fusion Middleware Administrator's Guide.

The Pagelet Producer stores all configuration data on a separate partition in the MDS schema of RCU. Typically, this schema is installed as part of the Oracle WebCenter Portal installation. This configuration data does not conflict with data that belongs to other services. When the Pagelet Producer domain template is deployed, the wizard prompts for connectivity information to the database in which the schema has been created. The names that the Pagelet Producer expects are:

  • Datasource Name: mds-PageletProducerDS

  • JNDI name: jdbc/mds/PageletProducerDS

  • MDS partition name: pageletproducer

To use OpenSocial gadgets in conjunction with WebCenter Portal profile and activities features, you must manually configure the WebCenterDS data source to target the WC_Portlet server.

  1. In the Oracle WebLogic Server Console, go to Services > Data Source.

  2. Click on the WebCenterDS data source.

  3. Go to the Targets tab.

  4. Select the WC_Portlet server and click Save.

25.2.4 Registering Pagelet Producer Using WebCenter Portal: Spaces

This section explains how to register the Pagelet Producer in WebCenter Portal: Spaces.

  1. Log in to Spaces and click Administration.

  2. Navigate to the Configuration tab and click Services.

  3. On the Services and Providers page, click Portlet Producers.

  4. Click Register and select Pagelet Producer.

  5. Enter the following information:

    • Producer Name: Used to identify the Pagelet Producer registration in Spaces.

    • Server URL: URL to the Pagelet Producer in the format http://host:port/pagelets (where host and port correspond to the WC_Portlet managed server where the Pagelet Producer is configured).

25.3 Configuring Pagelet Producer Settings

The Settings section in the Pagelet Producer Console provides access to important configuration settings that affect all Pagelet Producer resources. For an introduction to the Pagelet Producer Console, see Section 25.1, "About the Pagelet Producer.".

The following pages are included in the Settings section:

25.3.1 Logging Settings

The Logging page allows you to set logging levels for Pagelet Producer components.

Figure 25-1 Pagelet Producer Console: Settings - Logging

Description of Figure 25-1 follows
Description of "Figure 25-1 Pagelet Producer Console: Settings - Logging"

To enable logging for any component, choose one of the following logging levels:

  • Severe

  • Warning

  • Info

  • Config

  • Fine

  • Finer

  • Finest

Logging messages can be viewed in the managed server log files. In Oracle WebLogic Server, this would be domain_home/servers/managed server name/managed server name.log and managed server name-diagnostic.log.

25.3.2 Proxy Settings

The Proxy page allows you to define a semicolon-separated list of URLs that will not be proxied (wildcards are allowed), and set the HTTP proxy configuration if necessary (URL, user name and password).

You must restart the Pagelet Producer after changing the proxy settings.

Note:

If an HTTP proxy is required for external connections in the deployment environment, initial server startup will report connection errors. These errors are not an indication of problems with the environment; they indicate that some external OpenSocial libraries cannot be loaded remotely. The errors can be resolved by configuring the proxy settings as described above and restarting the server.

Note for Oracle WebLogic Server deployments:

The HTTP Proxy Server URL entered on the Proxy page is applied to all applications running on the server that hosts the Pagelet Producer (on Oracle WebLogic Server, this setting is applied to all applications running on the WC_Portlet managed server). Oracle WebLogic Server users should pay particular attention to this setting and make sure that the WLS Administrative Server host and all clustered managed servers are included in the "Do not proxy hosts" list.

Figure 25-2 Pagelet Producer Console: Settings - Proxy

Description of Figure 25-2 follows
Description of "Figure 25-2 Pagelet Producer Console: Settings - Proxy "

25.3.3 Transform Settings

The Transform page allows you to enter the path to the credential vault provider and configure secure and insecure ports for the Pagelet Producer. This page also allows you to choose whether or not to intercept and transform Ajax requests, and whether or not to log pre- and post- transformation content (this option can be useful for debugging, but should not be enabled in a production environment).

Note:

The Nonsecure Port defaults to 8889. If the Pagelet Producer is deployed on a different port, change this entry and restart the server.

Figure 25-3 Pagelet Producer Console: Settings - Transform

Description of Figure 25-3 follows
Description of "Figure 25-3 Pagelet Producer Console: Settings - Transform"

25.3.4 CSP Settings

CSP is a platform-independent protocol based on the open standard of HTTP 1.1. CSP defines the syntax of communication between the Pagelet Producer and external resources. It also defines custom headers as well as outlines how services use HTTP to communicate and modify settings.

This page allows you to configure the Oracle WebCenter Interaction Credential Mapper, SOAP API service, and image service.

Note:

This page may be ignored if Oracle WebCenter Interaction is not present in your deployment. These settings are used for backwards compatibility with CSP portlets written for Oracle WebCenter Interaction.

25.3.5 Kerberos Settings

This page is used to define the paths to the Kerberos configuration files (java.security.krb5.conf and java.security.auth.login.conf). These two configuration files are needed to configure the Kerberos realm and KDC to instruct HTTPClient where to retrieve the Kerberos Service ticket.

25.3.6 OpenSocial Settings

This page allows you to configure the Pagelet Producer for use with OpenSocial gadgets.

Figure 25-4 Pagelet Producer Console: Settings - OpenSocial

Description of Figure 25-4 follows
Description of "Figure 25-4 Pagelet Producer Console: Settings - OpenSocial"

This page includes the following settings:

  • The Context field defines the context to which the Pagelet Producer is deployed. This value should be left at the default setting ("pagelets") unless a change is required by the OpenSocial container.

  • The Host field should contain the fully-qualified domain name of Pagelet Producer host. This value should be retrieved automatically from the environment; if it is not, restart the server to pick up the correct configuration settings. As with the Context setting, this value should be left at the default unless a change is required by the OpenSocial container.

  • The Cache option enables Pagelet Producer internal caching for OpenSocial gadgets.

  • The Debug option enables debugging for OpenSocial gadgets (disables JavaScript obfucation).

  • The SSL option enables SSL for OpenSocial gadgets.

Note:

You must also configure the secure (HTTPS) and nonsecure (HTTP) ports before importing OpenSocial gadgets. For details on these settings, see Section 25.3.3, "Transform Settings."

25.4 Creating Resources

As noted in Section 25.1, "About the Pagelet Producer," resources are applications registered with the Pagelet Producer. Registering an application as a resource allows the proxy to map internal applications to external URLs, manage authentication, and transform application functionality.

To create a new resource, use the steps below:

  1. Select the Resources option from the dropdown list in the Pagelet Producer Console navigator.

  2. Click on any existing resource and click the Create icon in the navigator toolbar. (This button is only enabled when you have selected an object type that can be created.)

    Figure 25-5 Pagelet Producer Console - Create Resource

    Description of Figure 25-5 follows
    Description of "Figure 25-5 Pagelet Producer Console - Create Resource"

  3. In the Select Producer Type dialog box, choose the type of producer that the resource will be configured to proxy from the dropdown list:

    • Web: Any standard web application

    • CSP: CSP portlet provider application (for use with Oracle WebCenter Interaction)

    • WSRP/JPDK: WSRP or Oracle JPDK portlet producer (before you create a resource of this type, register the associated producer as described in Section 25.9, "Registering WSRP and Oracle JPDK Portlet Producers.")

    • OpenSocial: OpenSocial Container

    Figure 25-6 Select Producer Type Dialog

    Description of Figure 25-6 follows
    Description of "Figure 25-6 Select Producer Type Dialog"

  4. Click OK. An entry called "<new>" will be added to the list of resources. This new resource will include the necessary configuration pages for the producer type chosen.

  5. Configure the resource in the Pagelet Producer Console. The required configuration pages differ based on the type of producer. To save your changes at any time, click the Save icon in the navigator toolbar.

Once the resource is defined, create pagelets and other objects within the resource.

25.4.1 Configuration Pages: Web and CSP Resources

The following configuration pages are used for Web and CSP resources:

This section uses the welcome_resource created when the Pagelet Producer is installed as an example.

25.4.1.1 General

On the General page, enter basic information about the resource.

Figure 25-7 Pagelet Producer Console: Resource - General Page

Description of Figure 25-7 follows
Description of "Figure 25-7 Pagelet Producer Console: Resource - General Page"

  • Enter a Name for the resource.

  • Enter a Description for the resource (optional).

  • In the Source URL field, type the URL to the location of the web application resource to be proxied. For example, http://internalServer/foo/.

    Note:

    If you are configuring an ADF Web Application as a resource, the Source URL cannot be any more specific than http://hostname:portnumber/context-root/.

  • By default, the Pagelet Producer attempts to connect to the resource for 30 seconds before returning an error message. To change this value, enter a new Source Timeout period in seconds.

  • In the Destination URL field, type the relative path to be used to access the resource. This path will be used to create an URL to the resource on the server that hosts the Pagelet Producer.

  • The Pagelet Producer enables URL Rewriting by default. When URL rewriting is enabled, the Pagelet Producer rewrites URLs in the proxied application that begin with the source URL prefix so that they point to the destination URL prefix. If any URLs point to other proxied CSP or web applications (also registered with the Pagelet Producer), those URLs will also be rewritten to use the proxy.

    There are two cases in which you should disable URL rewriting:

    • The internal URL prefix and external URL prefix are identical. In this case, the user's DNS must resolve the URL to the Pagelet Producer proxy server, and the Pagelet Producer proxy server's DNS must resolve the URL to the internal resource. Because DNS only resolves IP and not port, both servers must listen to the same port. This method is strongly recommended.

    • All links in the application are relative URLs. In this case, the internal URL prefix path and the external URL prefix path must be identical. For example, if the internal URL prefix is http://internal_server/bar/ the external URL prefix path must be /bar/ or http://proxy_server/bar/.

    To disable transformation, deselect URL Rewriting.

  • To enable Dynamic HTML, choose DHTML Rewriting. This option supports URLs that are not in the original HTML returned from the server, but are added by DHTML. In most cases, this option should be enabled.

25.4.1.2 CSP

The preference headers specified on the CSP page are passed between the Pagelet Producer and remote CSP content producers. Basic preference types are supported natively and other preference types are mapped to one of the basic types.

Note:

When accessing content that is built using web standards (javascript and HTML), these settings can be ignored or leveraged partially by sending the CSP-Set-Preference and CSP-Get-Preference headers as documented by the CSP protocol.

Figure 25-8 Pagelet Producer Console: Resource - CSP Page

Description of Figure 25-8 follows
Description of "Figure 25-8 Pagelet Producer Console: Resource - CSP Page"

User and session scope preferences can be shared by more than one pagelet. CSP metadata can be used to specify which session preferences can be set or obtained from the application and which user info preferences will be sent to the application. For example, if you store personally identifiable information such as an employee ID as a user preference, you can control which pagelets have access to this information.

By default, the CSP login token is not passed to the proxied resource. To enable this feature, choose Send CSP Login Token. You must also enter the name and type of each of the settings that should be retrieved from the Pagelet Producer.

Note:

Pagelets associated with a resource inherit this metadata.

25.4.1.3 Policy

The Policy page allows you to limit access to a resource to specific roles within Oracle WebCenter Portal.

Figure 25-9 Pagelet Producer Console: Resource - Policy Page

Description of Figure 25-9 follows
Description of "Figure 25-9 Pagelet Producer Console: Resource - Policy Page"

The J2EE container hosting the Pagelet Producer (such as Oracle WebLogic Server) is responsible for establishing the role memberships associated with the current user. A resource can specify multiple roles on the Policy page, and users will be allowed access if they are a member of any of the specified roles; otherwise they will be directed to a suitable J2EE container delegated authentication page to establish the required credentials. If no roles are entered in the list, anonymous access is allowed, and the resource is termed as an "anonymous resource".

Note:

The role name(s) entered on this page must match those created in the J2EE container (such as Oracle WebLogic Server).

25.4.1.4 Autologin

The autologin feature allows the Pagelet Producer to supply credentials to applications automatically. The Autologin page allows you to configure authentication information for a resource for use by all users who access the resource.

Figure 25-10 Pagelet Producer Console: Resource - Autologin Page

Description of Figure 25-10 follows
Description of "Figure 25-10 Pagelet Producer Console: Resource - Autologin Page"

The sections that follow describe how to configure credential mapping for authentication:

25.4.1.4.1 Form Login

This section describes how to configure autologin for a resource that prompts for authentication with an HTML form.

  1. On the Autologin page for the resource, expand the Form Login section.

  2. The login page can be identified by an URL or a regular expression. In the Login Form Identification section, choose one of the following options:

    • If the login form is located at a static URL, select URL and type the URL into the box. You can choose to Automatically Detect Form Fields on the page or enter them manually as described in step 5 below.

    • If the login form is dynamic, select RegEx and type the regular expression pattern into the box.

  3. Set the login form action. In the Form Submit Location section, choose one of the following options:

    • If the login form action is a static URL, select URL and type the URL into the box. Choose the action for the form submission: POST or GET.

    • If the login form is dynamic, select RegEx and type the regular expression pattern into the box.

  4. To map fields from the form to authentication field sources, either click Automatically Detect Form Fields in the Login Form Identification section or enter them manually using the process below:

    1. Click Create to add a new row to the Form Fields list.

    2. Type the name of the HTML form input in the Field Name box.

    3. For details on how to configure the Source and Value properties, see Section 25.4.1.4.4, "Authentication Sources."

      Note:

      Sensitive fields should be stored securely using the credential vault (User Vault or Shared Vault).

    4. To delete field mappings, click Delete.

  5. The logout page and login error pages can also be identified by an URL or a regular expression. In the Logout Page Identification and Login Error Page Identification sections, choose one of the following options:

    • If the page is located at a static URL, select URL and type the URL into the field provided.

    • If the page is dynamic, select RegEx and type the regular expression pattern into the field provided.

25.4.1.4.2 Basic Login and NTLM Login

This section describes how to configure autologin for a resource that prompts for authentication with basic authentication or NTLM.

  1. On the Autologin page for the resource, expand the Basic Login or NTLM Login section.

    Note:

    "Basic authentication transmits passwords as plain text, and therefore, it must not be used in production systems. Further, it is strongly recommended that the underlying transport is HTTPS.

  2. In the Username and Password sections, choose the appropriate authentication source and enter a value as necessary. For details on how to configure these properties, see Section 25.4.1.4.4, "Authentication Sources".

25.4.1.4.3 Kerberos Login

This section describes how to configure autologin for a resource that prompts for authentication using Kerberos. For information on defining basic Kerberos settings, see Section 25.3, "Configuring Pagelet Producer Settings."

  1. On the Autologin page for the resource, expand the Kerberos Login section.

  2. In the Username and Password sections, choose the appropriate authentication source and enter a value as necessary. For details on how to configure these properties, see the next section, Section 25.4.1.4.4, "Authentication Sources".

  3. In the SPN field, enter the Service Principal Name (SPN) for the Kerberos account, in the format http://hostname_with_kerberos. (Before the Kerberos authentication service can use an SPN to authenticate a service, the SPN must be registered on the account object that the service instance uses to log on.)

25.4.1.4.4 Authentication Sources

Authentication sources define the source for login fields. The following table describes each of the authentication field source values:

Table 25-2 Pagelet Producer Authentication Sources

Field Description

Static

Uses the provided authentication information for all users accessing the resource. Type the static value in the field provided.

Profile

Uses properties from the user's Oracle WebCenter Portal profile to supply credential data for authentication.

User Vault or
Shared Vault

Prompts the user for credentials the first time the resource is accessed. The supplied credentials are encrypted and stored in the credential vault, and each subsequent access to the resource is authenticated with the stored credentials. When using vault storage, the key name chosen should be a generic placeholder and should not reflect sensitive information like the actual password.In the second field, enter the name of the credential vault to use, or leave the entry as "default" to use the server vault.

User Vault stores one value per key per user, while Shared Vault stores one value per key for all users.


25.4.1.5 Headers

The Headers page allows you to choose Request and Response headers that should be dropped from the HTTP that is provided by the Pagelet Producer.

Figure 25-11 Pagelet Producer Console: Resource - Headers Page

Description of Figure 25-11 follows
Description of "Figure 25-11 Pagelet Producer Console: Resource - Headers Page"

Some header elements should be blocked from being passed to back-end applications. For example, when using delegated (third-party SSO) authentication, the SSO system might insert some headers that need not be passed to the back-end applications. When passed, these headers might interfere with the back-end application functionality.

If any headers are specified on this page, only the specified headers will be dropped. If no headers are explicitly specified, the following headers are dropped by default:

Request Headers Response Headers

- Cache-Control

- Connection

- Cookie

- Host

- Max-Forwards

- Pragma

- Proxy-Connection

- Proxy-Authorization

- TE

- Trailer

- Transfer-Encoding

- Upgrade

- Max-Forwards

- Proxy-Authenticate

- Proxy-Connection

- Set-Cookie

- Trailer

- Transfer-Encoding

- Upgrade


To add a header to the list, click Create and enter the header name in the field provided. The Content-Length header is always implicitly dropped, because manipulating content during the proxying operation renders the content length invalid in almost all cases.

Once the resource is defined, you can create pagelets and other objects within the resource.

25.4.2 Configuration Pages for WSRP/JPDK Resources (WSRP and Oracle JPDK Portlet Producers)

The following configuration pages are used for WSRP/JPDK resources, which are based on WSRP or Oracle JPDK portlet producers.

Note:

Before you can create a resource based on a WSRP or Oracle JPDK portlet producer, you must register the producer as described in Section 25.9, "Registering WSRP and Oracle JPDK Portlet Producers."

25.4.2.1 General

On the General page, enter basic information about the resource.

25.4.2.2 Policy

The Policy page allows you to limit access to a resource to specific roles within Oracle WebCenter Portal.

The J2EE container hosting the Pagelet Producer (such as Oracle WebLogic Server) is responsible for establishing the role memberships associated with the current user. A resource can specify multiple roles on the Policy page, and users will be allowed access if they are a member of any of the specified roles; otherwise they will be directed to a suitable J2EE container delegated authentication page to establish the required credentials. If no roles are entered in the list, anonymous access is allowed, and the resource is termed as an "anonymous resource".

Note:

The role name(s) entered on this page must match those created in the J2EE container (such as Oracle WebLogic Server).

Once the resource is defined, you can create pagelets and web injectors within the resource.

25.4.3 Configuration Pages for OpenSocial Resources (OpenSocial Gadget Producers)

The following configuration pages are used for OpenSocial resources, which are based on OpenSocial gadget producers.

Note:

Configure the Pagelet Producer for use with OpenSocial before creating an OpenSocial resource. For details, see Section 25.3.6, "OpenSocial Settings."

25.4.3.1 General

On the General page, enter basic information about the resource.

  • Enter a Name for the resource.

  • Enter a Description for the resource (optional).

  • The Source URL field should be pre-filled with the relative URL to the internal OpenSocial Container ("/os/"). Registering external OpenSocial Containers is not supported.

  • In the Destination URL field, type the relative path to be used to access the resource. This path will be used to create the URL to the OpenSocial container on the server that hosts the Pagelet Producer.

25.4.3.2 Policy

The Policy page allows you to limit access to a resource to specific roles within Oracle WebCenter Portal.

The J2EE container hosting the Pagelet Producer (such as Oracle WebLogic Server) is responsible for establishing the role memberships associated with the current user. A resource can specify multiple roles on the Policy page, and users will be allowed access if they are a member of any of the specified roles; otherwise they will be directed to a suitable J2EE container delegated authentication page to establish the required credentials. If no roles are entered in the list, anonymous access is allowed, and the resource is termed as an "anonymous resource".

Note:

The role name(s) entered on this page must match those created in the J2EE container (such as Oracle WebLogic Server).

Once the resource is defined, you can create pagelets and files within the resource.

25.5 Creating Pagelets

The pagelets collection lists the pagelets associated with the resource. To create a new pagelet, select the Pagelets section under the resource you want to use in the Pagelet Producer Console and click the Create icon in the toolbar. A pagelet called "<new>" will be added to the list. To modify an existing pagelet, click the pagelet name. Each pagelet has the following configuration pages:

25.5.1 General

Enter a Name for the pagelet and the Library name with which to associate the pagelet. (A pagelet library is a user-defined way to group related pagelets.) Enter a Description for the pagelet (optional).

The Refresh Inline option should be used only if the pagelet is to be injected into the page body without using an IFrame. Since IFrame injection is the default and recommended method for implementing partial page refresh for pagelet click-throughs, this option should only be enabled under very rare circumstances.

  • For web and CSP pagelets, type the relative path to the pagelet in the URL Suffix field (do not include the Source URL prefix you entered for the resource). If you leave the URL Suffix blank, then the entire resource will be considered the pagelet.

  • For pagelets based on WSRP or Oracle JPDK portlets, choose the portlet on which to base the pagelet from the Portlet dropdown list. This list is populated with the portlets on the WSRP or Oracle JPDK portlet producer associated with the parent resource. Any public parameters associated with the portlet will automatically be imported as pagelet parameters. For more information on working with WSRP and Oracle JPDK portlets, see Section 25.9, "Registering WSRP and Oracle JPDK Portlet Producers" and Section 25.4.2, "Configuration Pages for WSRP/JPDK Resources (WSRP and Oracle JPDK Portlet Producers)."

  • For pagelets based on OpenSocial gadgets, enter the location of the gadget XML schema in the Gadget URL field. Click the Import Gadget Metadata button to import the following information from the XML schema:

    • Gadget name: This value will be imported into the Description field on the General page.

    • Gadget user preferences: The pagelet parameters on the Parameters page will be populated with the gadget's user preferences.

    • Preference editor: If there are any editable user preferences, the Personalize Editor field on the Preferences page will be populated and a preference page will be created using the preferences on the Parameters page.

25.5.2 Preferences

On the Preferences page, enter the relative URLs to any preference pages required by the pagelet: Global, Customize, or Personalize. Do not include the Source URL prefix you entered for the resource. (As noted above, for OpenSocial gadgets with user preferences, a default entry will be created; this entry should not be modified.)

The Preferences page is not used by WSRP or Oracle JPDK-based pagelets.

Figure 25-12 Pagelet Producer Console: Pagelets - Preferences Page

Description of Figure 25-12 follows
Description of "Figure 25-12 Pagelet Producer Console: Pagelets - Preferences Page"

25.5.3 Parameters

Data can be passed to pagelets using pagelet parameters or the pagelet payload. Parameters pass name-value pairs to the pagelet application, while the payload is any text, including XML. You can write an XML Schema to describe the XML that a particular pagelet expects and document this by entering a URI to and XSD file or a namespace:name qualifier on this page. This value is for convenience only, it is not used or enforced at runtime.

On the Parameters page, enter the Payload Schema or the Parameters that should be passed to the pagelet.

To add a parameter, click Create.

  • Enter the Name of the parameter.

  • Choose the Transport type: Request Parameter, Administrative Preference, Community Preference, or Pagelet Preference.

    Note:

    The Request Parameter transport type should be use in most cases. Request Parameters are sent as query string arguments on the URL to the pagelet's host server. The preference transport types should only be used for CSP pagelets.

  • If the parameter is required by the pagelet, select the Required checkbox.

  • Choose the appropriate data Type: string or numeric.

Figure 25-13 Pagelet Producer Console: Pagelets - Parameters Page

Description of Figure 25-13 follows
Description of "Figure 25-13 Pagelet Producer Console: Pagelets - Parameters Page"

25.5.4 Clipper

Clipping allows you to form a pagelet by clipping a portion of a larger web page in a proxied application. For example, in a news web page there is a box listing the latest headlines. By identifying the containing HTML for that box, you can clip only the headlines and serve that subset of the news web page as a pagelet.

To create a clipper, select the Clipper section under the pagelet and click the Create icon in the toolbar. A new clipper will be created with two configuration pages:

  • On the General page, enter a name for the clipper.

  • On the Content page, define the clipper content.

    In addition to clipping a portion of the body of the web page, the pagelet's <head> element can be included by choosing Include head. This allows CSS, JavaScript, or other declarations that occur in the <head> element to be included with the clipped body portion.

    • To use a graphical tool to select page content, click Launch Clipper.

    • To specify HTML tag attributes that describe the section to be clipped, expand the Advanced Clipper section and enter the tag name and associated attribute(s).

    Figure 25-14 Pagelet Producer Console: Clipper - Content Page

    Description of Figure 25-14 follows
    Description of "Figure 25-14 Pagelet Producer Console: Clipper - Content Page "

Keep the following in mind when using the clipper:

  • If the back-end resource is accessed over HTTPS, make sure the Pagelet Producer Console is also accessed over a secure port.

  • If the clip source is protected by a login form or other form of authentication, make sure to configure Autologin for the parent resource as described in Section 25.4.1.4, "Autologin". If you are using the vault to store credential values, make sure to capture the credentials prior to using the clipper.

  • If you are having problems with the clipper, make sure the configured pagelet URL can be loaded by the browser without redirects. If necessary, change the pagelet suffix to reflect the final URL loaded by the browser after following all the redirects.

  • Images and code overwritten using hosted files cannot be clipped. (For details on hosted files, see Section 25.8, "Creating Hosted Files.")

25.5.5 Documentation

The Documentation page displays sample code to access the pagelet and preference editor using either the JavaScript or REST API.

Figure 25-15 Pagelet Producer Console: Pagelets - Documentation Page

Description of Figure 25-15 follows
Description of "Figure 25-15 Pagelet Producer Console: Pagelets - Documentation Page "

25.6 Creating Web Injectors

A web injector inserts content into a specified location in the proxied resource page. The content may be any text, including HTML, CSS, JavaScript, and pagelet declarations. An empty injector may also be used to remove unwanted content from a page. Injectors cannot be created for OpenSocial resources.

To create a web injector, select the Injectors section under the resource you want to use and click the Create icon in the toolbar. A new injector called "<new>" will be added to the list. Injectors have the following configuration pages:

25.6.1 General

Enter a Name for the web injector.

The injector can be applied to a subset of the resource by typing a URL pattern into the URL Filter box. The injector will be applied only to those URLs within the resource that begin with the text in the URL Filter box. If the box is empty or contains only a '/', the injector will be applied to the entire resource.

To restrict the injector to specific kinds of content, type a comma separated list of MIME types in the MIME Filter box. For example, text/html restricts the injector to HTML content, while text/css only restricts the injector to CSS content.

Define where in the resource's output the injection will be made:

  • Top puts the content first in the page. Do not use this option to inject pagelet declarations.

  • Bottom puts the content last in the page.

  • The Before/After/Replace options put the content into the page relative to the unique string specified in the field provided. You can choose to ignore the case of the string by selecting Ignore case.

    The Enclose tag option identifies the unique string and replaces both the text and the enclosing tag with the content specified on the next page.

Figure 25-16 Pagelet Producer Console: Injectors - General Page

Description of Figure 25-16 follows
Description of "Figure 25-16 Pagelet Producer Console: Injectors - General Page"

25.6.2 Content

Content to be injected may be any text, including HTML, CSS, JavaScript, and pagelet declarations. Content can be entered using the text editor or the HTML editor.

Figure 25-17 Pagelet Producer Console: Injectors - Content Page

Description of Figure 25-17 follows
Description of "Figure 25-17 Pagelet Producer Console: Injectors - Content Page "

25.7 Creating Custom Parsers

Custom parsers allow you to supplement or change built-in logic for parsing content and finding URLs. When the built-in parsers fail to identify URLs or identify sections that must not be rewritten as URLs, custom parsers can be used to change the default behavior. Parsers cannot be created for WSRP or Oracle JPDK portlet producers or OpenSocial gadget producers.

To create a custom parser, select the Parsers section under the resource you want to use and click the Create icon in the toolbar.

Figure 25-18 Pagelet Producer Console: Parsers - General Page

Description of Figure 25-18 follows
Description of "Figure 25-18 Pagelet Producer Console: Parsers - General Page"

25.8 Creating Hosted Files

The Pagelet Producer can host all types of content (HTML, JavaScript, CSS, etc.) and present the file at a virtual URL location. Hosted files can be used for a range of purposes:

To upload a file, select the Files section under the resource you want to use and click the Create icon in the toolbar.

After the file is uploaded, it will be available for use in injectors and pagelets at the following URL: http://<host_name>:<port_number>/pagelets/<resourcename>/<filepath>.

For example, if the file was uploaded under the "welcome_resource" resource and the name for the file was entered as "images/myimage.jpg" the path to the hosted file on the Pagelet Producer server would be: http://<host_name>:<port_number>/pagelets/welcome_resource/images/myimage.jpg

Keep the following in mind when working with hosted files:

25.9 Registering WSRP and Oracle JPDK Portlet Producers

The Pagelet Producer can expose WSRP and Oracle JPDK portlets as pagelets for use in Framework applications, Spaces, and third-party portals. After registration, the associated resource in the Pagelet Producer is automatically populated with pagelets to represent the portlets associated with the portlet producer.

This section provides detailed instructions on registering WSRP and Oracle JPDK portlet producers and importing the associated portlets.

Note:

By default, access to producer registration is limited to Oracle WebLogic Server Administrators.

If a user should have access and it is not possible to add the user to the Administrators group; use the grantAppRole WLST command as shown below:

grantAppRole(appStripe="pagelet-producer",
> appRoleName="AppConnectionManager",
> principalClass="weblogic.security.principal.WLSUserImpl",
> principalName="monty")

For information on how to run WLST commands, see Section 1.13.3.1, "Running Oracle WebLogic Scripting Tool (WLST) Commands."

25.9.1 Registering WSRP Portlet Producers

You can use Enterprise Manager, WLST or the Pagelet Producer Console to register a WSRP endpoint as a portlet producer. After registration, a new Pagelet Producer resource is created and automatically populated with pagelets to represent the portlets associated with the WSRP endpoint.

  1. Register the WSRP endpoint using either Enterprise Manager or the Pagelet Producer Console.

    • In Enterprise Manager, go to the Pagelet Producer application. From the Application Deployment menu, click WebCenter Portal > Register Producer.

    • In the Pagelet Producer Console, choose Producers from the dropdown menu in the navigator toolbar. On the Portlet Producer page, click Register.

  2. Enter a name for the producer. Choose WSRP Producer as the Producer Type.

  3. Enter the WSDL URL for the WSRP endpoint (for example, http://www.oasis-open.org/committees/wsrp/specifications/version1/wsrp_v1_interfaces.wsdl).

    Figure 25-20 Pagelet Producer Console: Register Portlet Producer - WSRP Producer

    Description of Figure 25-20 follows
    Description of "Figure 25-20 Pagelet Producer Console: Register Portlet Producer - WSRP Producer"

  4. If an HTTP proxy is required when contacting the producer, select the Use Proxy? option and enter the host name and port number for the proxy server. (A proxy is required if the Pagelet Producer and the portlet producer are separated by a firewall)

  5. Enter a suitable Default Execution Timeout for communications with the producer. The default is 30 seconds. Individual portlets may define their own timeout period, which takes precedence over the value defined here.

  6. If the producer requires authentication, select the appropriate Token Profile from the dropdown list in the Security section and enter any necessary configuration information. If a keystore is used by the selected token profile, the path to the keystore entered on this page must be absolute.

    Figure 25-21 Pagelet Producer Console: Register Portlet Producer - WSRP Producer: Token Profile

    Description of Figure 25-21 follows
    Description of "Figure 25-21 Pagelet Producer Console: Register Portlet Producer - WSRP Producer: Token Profile "

  7. Click the Save icon in the navigator toolbar.

  8. To confirm that the configuration is correct, click the Test button.

    Figure 25-22 Pagelet Producer Console: Register Portlet Producer - Successful Test Popup

    Description of Figure 25-22 follows
    Description of "Figure 25-22 Pagelet Producer Console: Register Portlet Producer - Successful Test Popup"

    If the test is successful, click OK to close the popup. If the test is not successful, click OK to close the popup and make modifications to the configuration as necessary.

  9. After you have run a test successfully, click OK to save your configuration settings and return to the Portlet Producers list.

  10. If you registered the producer in Enterprise Manager, you must load the external registration in Pagelet Producer. Either restart the Pagelet Producer server, or complete the following steps:

    1. Open the Pagelet Producer Console and select Producers from the drop-down list in the navigator toolbar.

    2. On the Portlet Producers page, select the new WSRP producer and click Refresh.

Once registration is complete, the WSRP producer will appear as a resource in the Pagelet Producer Console, and the portlets associated with the WSRP endpoint will be listed in the pagelets collection for the resource.

The settings and parameters for the new pagelets are based on the portlet definitions in the WSDL for the WSRP producer. If additions or modifications are made to the WSRP portlets, refresh the producer registration as described in step 10 above to import the changes. WSRP-based pagelets can be used like any other pagelets.

Note:

Auto-generated resources and pagelets cannot be modified. To make changes to the WSRP-based pagelets, follow the steps in the next section, Section 25.9.3, "Using WSRP and Oracle JPDK Portlets."

25.9.2 Registering Oracle JPDK Portlet Producers

Oracle WebCenter Portal's Pagelet Producer can expose Oracle JPDK portlets as pagelets for use in Framework applications, Spaces, and third-party portals.

You can use Enterprise Manager, WLST or the Pagelet Producer Console to register a Oracle JPDK endpoint as a portlet producer. After registration, a new Pagelet Producer resource is created and automatically populated with pagelets to represent the portlets associated with the Oracle JPDK producer.

  1. Register the Oracle JPDK endpoint using either Enterprise Manager or the Pagelet Producer Console.

    • In Enterprise Manager, go to the Pagelet Producer application. From the Application Deployment menu, click WebCenter Portal > Register Producer.

    • In the Pagelet Producer Console, choose Producers from the dropdown menu in the navigator toolbar. On the Portlet Producer page, click Register.

  2. Enter a name. Choose Oracle PDK-Java Producer as the Producer Type.

  3. Enter the URL Endpoint for the Oracle JPDK producer using the following syntax:
    http://host_name:port_number/context_root/providers
    where host_name is the server where the producer is deployed, port_number is the HTTP Listener port number and context_root is the application's context root (providers is static text). For example: http://myHost.com:7778/myEnterprisePortlets/providers.

    Figure 25-23 Pagelet Producer Console: Register Portlet Producer Page - Oracle PDK-Java Producer

    Description of Figure 25-23 follows
    Description of "Figure 25-23 Pagelet Producer Console: Register Portlet Producer Page - Oracle PDK-Java Producer"

  4. If an HTTP proxy is required when contacting the producer, select the Use Proxy? option and enter the host name and port number for the proxy server. (A proxy is required if the Pagelet Producer and the portlet producer are separated by a firewall).

  5. If any of the portlets on the Oracle JPDK producer require authentication, select the relevant external application from the Associated External Application drop-down list.

  6. To enable a user session when executing portlets from the Oracle JPDK producer, select the Establish Session? option. Sessions are maintained on the producer server, allowing portlet code to maintain information in the session. Message authentication uses sessions, so if a shared key is specified in the Advanced Configuration section, this option should also be selected. For sessionless communication between the producer and the server, do not select this option.

  7. Enter a suitable Default Execution Timeout for communications with the produce (the maximum time the producer may take to register, deregister, or display portlets). The default is 30 seconds. Individual portlets may define their own timeout period, which takes precedence over the value defined here.

  8. In the Subscriber ID field, enter a string to identify the consumer of the producer being registered. When a producer is registered with an application, a call is made to the producer. During the call, the consumer passes the value for Subscriber ID to the producer. If the producer does not see the expected value for Subscriber ID, it might reject the registration call.

  9. If the producer is set up to handle encryption, enter a Shared Key (also known as the HMAC key). The shared key is used by the encryption algorithm to generate a message signature for message authentication. Note that producer registration will fail if the producer is set up with a shared key and you enter an incorrect value here. The shared key can contain between 10 and 20 alphanumeric characters.

  10. Click the Save icon in the navigator toolbar.

  11. To confirm that the configuration is correct, click the Test button.

    Figure 25-24 Pagelet Producer Console: Register Portlet Producer - Successful Test Popup

    Description of Figure 25-24 follows
    Description of "Figure 25-24 Pagelet Producer Console: Register Portlet Producer - Successful Test Popup"

    If the test is successful, click OK to close the popup. If the test is not successful, make modifications to the configuration as necessary and run the test again.

  12. After you have run a test successfully, click OK to save your configuration settings and return to the Portlet Producers list.

  13. If you registered the producer in Enterprise Manager, you must load the external registration in Pagelet Producer. Either restart the Pagelet Producer server, or complete the following steps:

    1. Open the Pagelet Producer Console and select Producers from the drop-down list in the navigator toolbar.

    2. On the Portlet Producers page, select the new Oracle JPDK producer and click Refresh.

Once registration is complete, the Oracle JPDK producer will appear as a resource in the Pagelet Producer Console, and the portlets associated with the producer will be listed in the pagelets collection for the resource.

The settings and parameters for the new pagelets are based on the portlet definitions in the producer URL. If additions or modifications are made to the portlets, refresh the producer registration as described in step 13 above.

Note:

Auto-generated resources and pagelets cannot be modified. To make changes to the Oracle JPDK-based pagelets, see the next section, Section 25.9.3, "Using WSRP and Oracle JPDK Portlets."

25.9.3 Using WSRP and Oracle JPDK Portlets

Auto-generated WSRP and Oracle JPDK resources and pagelets cannot be modified. Primarily intended for initial testing, they are virtual entries and do not exist in Pagelet Producer metadata definitions.

To make changes and create a permanent reference to the producer, the auto-generated resource must be cloned. To create a version that can be modified, choose the resource in the Pagelet Producer Console navigator and click Clone. The cloned version of the resource can be edited, and various elements such as injectors can be added to customize pagelet functionality. Cloned resources are stable and will be included in metadata exports.

You can also define a portlet-based pagelet from scratch by creating a new resource based on an existing portlet producer and then creating individual pagelets. For details, see Section 25.4, "Creating Resources."

25.10 Troubleshooting

Keep the following common configuration errors in mind when troubleshooting resources and pagelets. For details on configuring Pagelet Producer settings, see Section 25.3, "Configuring Pagelet Producer Settings."

For additional troubleshooting information, use logging. The Pagelet Producer logs messages to the standard Oracle Diagnostic Logging facility. In Oracle WebLogic Server, that location is: user-projects/domains/<domain>/servers/ <server>/logs/<server>-diagnostic.log. For details on configuring logging, see Section 25.3.1, "Logging Settings." For more information on debugging pagelets, see Creating Pagelets with Oracle WebCenter Portal's Pagelet Producer in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter Portal