Rendering Portlet Best Practice

 

+
Search Tips   |   Advanced Search

 

User Access to WCM Content and Components

Users will only be able to view Content and Components that either their Portal User's logon or a Credential Vault Slot has access to. If a Portal User's logon or a Credential Vault Slot does not have sufficient rights in WCM to view a WCM Content or Component, errors may occur.

 

Content and Component Design

Not all Content or Components built in a WCM solution are suitable for inclusion within a WebSphere Portal page:

  • WCM Content or Components to be displayed within a WebSphere Portal page should be self-contained and not rely on other WCM Content or Components.

  • When creating Presentation Templates or Page Styles to use when displaying WCM Content within a Portlet, it is best practice to reference just the Content you would like to display. Components, such as Menus and Navigators, should be displayed in separate portlets and linked to the Content Portlet as required.

  • JavaScript URLs will not work.

Note that when a Web Page is rendered via the WCM application, some tags may be rewritten. The WCM application uses double quotes for attributes in HTML tags. If you use JavaScript to produce HTML tags, the WCM application will not recognize them if you use single quotes.

 

Path Component Tags

The URLs generated by the Path Component will be fully qualified when viewed through a Portal. To generate URLs with no prefix, use the following "Type" parameters instead of the standard parameters:

  • Type="noprefixbase" instead of Type="base"

  • Type="noprefixservlet" instead of Type="servlet"

  • Type="Prefix" When viewed through portal the, prefix value will be printed. If no prefix exists then empty string is returned.

 

Using "connect" Tag Generated URLs

By default, any links generated using "Connect" tags are relative. However, if you are viewing WCM content via a WebSphere Portal Server portlet, then these links will appear to be broken. To use URLs generated by "Connect" tags in a portlet, the URLs must be absolute. The WCM framework can be configured to use absolute URLs instead of relative URLs. To do this, the following setting must be added to the first section of connect.cfg:

<AlwaysUseAbsoluteURLs value=true />

 

Configure the Content Viewer portlet to connect to a Clustered WCM URL

You may receive errors when using the Content Viewer portlet to connect to a Clustered WCM URL. This occurs when the WebSphere Portal Server and the WCM server are accessed by the same host. This is because they are both trying to use the same cookie. By default, an Application Server uses a cookie with the name of JSESSIONID as the key to maintain session for that host. Since the WCM server is accessed by the same host, the Portal Server cookie overwrites the WCM cookie that maintains the session and vice versa. Logout is the result of losing a session.

There are three possible solutions:

Use the IP address Use the IP address of the WCM server instead of the HOST name when configuring the portlet.
Assign two host names You can assign two host names to the server running both WebSphere Portal Server and WCM and use one host.name for WCM and the other when configuring the portlet. There are two ways of doing this:

  • Assign two IP addresses to the WCM server and assign a different host.name to each IP.

  • Assign two Host names to the same IP in a DNS.
Change the default cookie name You could also change the default cookie name used by one of the servers:

  • Go to your WebSphere Application Server Admin Console.
  • Select Servers -> Application Servers -> WebSphere_Portal
  • Select Web Container-> Session Management
  • Click on the "Enable Cookies" link. (Leave it checked.)
  • Change the cookie name from JSESSIONID to JSESSIONID2.
  • Hit Apply and then Save the changes
  • Restart WebSphere Portal.

 

Other Limitations

  • The results of a POST in a form are only displayed within the Portlet that sent the POST. You cannot send the result of a POST to another Portlet.

  • WCM cannot be accessed behind a firewall. (Internet Sites) This is because WCM will still need to be accessed directly for images and other resources.

  • An Anonymous WebSphere Portal Server user will also be classed as an anonymous WCM user. I.e., the logon override does not work for Anonymous users.

  • When configuring the Rendering Portlet, if the Links settings are set to "none broadcasting" and "none receiving", the HTML displayed in the Portlet will be rendered as if being viewed outside the Portal environment. E.g. - URLs will not be fully qualified and therefore resources and images may not display properly. The "none broadcasting" and "none receiving" setting can therefore be used to deliver HTML that you do not wish to be altered when rendered via Portal.

  • If a WCM proxy server is being used with Rendering Portlets, all URLs rewritten by the proxy will not be fully-qualified, but server-relative instead. To address this issue, redirect mappings can be created in the HTTP Server configuration that will pass the URLs to the proxy server.

  • Web Content Management Caching features and Category Selection Trees cannot be used with the Local Rendering Portlet (Web Content Viewer).

Parent topic: Displaying Content in a Rendering Portlet.


IBM Workplace Web Content Management - V5.1.0.1 -

 

Workplace Web Content Management is a trademark of the IBM Corporation in the United States, other countries, or both.

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.