ShowTable of Contents
This article will be used to discuss some frequently asked questions about the JSR 286 Web Content Viewer portlet. Some issues have been identified with the first release of the JSR 286 rendering portlet. As workarounds or fixes are found they will be documented here.
When should I download the JSR 286 Web Content Viewer?
You should only download the JSR 286 Web Content Viewer portlet if you are running Portal/WCM versions 6.1.0.3 or later and have NOT enabled the feature pack. If the feature pack has been enabled, you already have the latest version of the portlet. This portlet is not supported to be installed on servers running version of WCM prior to 6.1.0.3
Minimum Prerequisites:
- WebSphere Portal and Web Content Management V6.1, fix pack 3
- Lotus Web Content Management cumulative interim fix 23 (CF23) fir V6.1.0.3 PM02697
- Lotus Web Content Management interim fix PM05948 (This fix is included in WCM Cumulative Fix 27 and later.)
The current version of the portlet is 1.0.2.3 (Updated date 04/28/10)
New catalog download link :
Download the JSR 286 Web Content Viewer
FAQ's
How do I find out the version of the portlet?
There are 2 places to lookup the version of the portlet.
- The ReadMe.txt file that is part of the 1WP1001S6.zip downloaded from the Portal Catalog
- The MANIFEST.MF in the META-INF directory inside the ilwwcm-localrenderingportlet-jsr.war file contains the property "Implementation-Version
How can I link to WCM content rendered in the new JSR 286 local rendering portlet from an external site?
To create a URL to a page with the new JSR 286 rendering portlet from an external site you have the following options:
Of course for both options to work the portlet on the page needs to listen to links from "This and other portlets".
The complete syntax of these kind URL's is:
/wps/[my]poc[/vp]?urile=wcm:path:[path to WCM content][&page=[unique name or ID] | &mapping=[url mapping] | ¤t=true]
- poc for un-authenticated access
- mypoc for authenticated access
To address a virtual portal append the VP mapping. E.g.:
- /wps/mypoc/myvp
- /wps/poc/myvp
Alternatively to using the poc servlet you can also append the "urile" parameter on any Portal URL including URL that contain URL mappings e.g to address a specific portal page defined by the url mapping use:
- /wps/[my]portal[/url mapping]?current=true&urile=wcm:path:[path to WCM content]
To address a specific portal page use one of the following parameters exclusively:
- page=unique name or ID of page
- mapping=url mapping label
- current=true (To stay on the current page)
To leverage dynamic WCM page lookup: ommit any page parameter use the [UrlCmpnt] tag to create links from withing the WCM system.
How can I access query parameter in my custom JSP when rendering with the JSR286 rendering portlet?
Since WCM 6.1.0.3 you can access all query parameter using the same way you did with the IBM API based legacy rendering portlet.
Access to the query parameter can be obtained through the corresponding method on the javax.servlet.ServletRequest interface.
To read a query parameter value in your JSP you can simply call:
<%
String value = request.getParameter("mykey");
%>
With WCM version before 6.1.0.3 query parameter in JSP's rendered via the JSR286 rendering portlet are only available
through the rendering context and the request parameter map provided on the com.ibm.workplace.wcm.api.RenderingContext interface. E.g.
<%
Map queryParams = renderingCtx.getRequestParameters();
String value = queryParams.get("mykey");
%>
How can I get a reference to the RenderingContext when rendering a JSP component with the JSR286 rendering portlet?
When rendering JSP components through the JSR286 local rendering portlet you need to check the
Workspace.WCM_RENDERINGCONTEXT_KEY attribute on the original PortletRequest.
There are 2 ways to achieve that:
1. Import the JSR Portlet JSP Tag lib and get the RenderingContext from the renderRequest object.
This approach is more elegant but it will only work when rendering via the JSR286 rendering.
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<portlet:defineObjects/>
<%
RenderingContext renderingCtx = request.getAttribute(Workspace.WCM_RENDERINGCONTEXT_KEY);
if(renderingCtx == null) {
renderingCtx = (RenderingContext)renderRequest.getAttribute(Workspace.WCM_RENDERINGCONTEXT_KEY);
}
%>
2. Get the PortletRequest from the ServletRequest as documented in the Java Portlet 2.0 Specification.
This works for rendering via the both (legacy and JSR286) rendering portlets and also for servlet rendering.
<%@ page import="javax.portlet.*"%>
<%
RenderingContext renderingCtx = (RenderingContext)request.getAttribute(Workspace.WCM_RENDERINGCONTEXT_KEY);
if(renderingCtx == null) {
Object portletRequest = request.getAttribute("javax.portlet.request");
if(portletRequest != null && portletRequest instanceof PortletRequest) {
// JSR286 rendering
renderingCtx = (RenderingContext) ((PortletRequest)portletRequest).
getAttribute(Workspace.WCM_RENDERINGCONTEXT_KEY);
}
}
%>
How do I dynamically change the portlet title in the JSR 286 web content viewer?
See the Information Center:
Change Portlet Title in JSR 286 Web Content Viewer
How do I remove/hide the Help mode in the JSR 286 web content viewer?
The supported way to do this is to create a custom skin that will not render the help link.
JSR 286 Web Content Viewer Documentation
When you download the porrtlet, a PDF file is included with the portlet. This PDF file(IBM Lotus WCM Rendering Portlet.pdf) very useful information included in it. For your convenience, we will also include this information here.
Setting up the JSR 286 Web Content Viewer
Before you can begin working with the JSR 286 Web Content Viewer, you must install the portlet and then enable the portlet to work with the portal.
Installing the portlet
Before you can add the JSR 286 Web Content Viewer portlet on a portal page, you must install the portlet. As with other portlets, perform the installation using the portal's administration portlets.
Before installing a portlet, be aware of the following requirements:
- An administrator must have the Manager role on the portal to install portlets, so ensure that you log in with a user ID that has Manager role access rights.
- You cannot install a portlet more than once. If you want two instances of a portlet application or portlet, use the copy command to create a second instance.
During the installation, the portlet state is set to active, and a new rule is automatically added to Access Control that defines the user who installed the portlet as the owner, granting management access for that portlet. The user must assign the appropriate user roles to the desired users and groups, so that these users and groups can access and use that portlet.
1. Log in to the portal as an administrator.
2. Click Administration in the tool bar.
3. Under Portlet Management in the navigation tree, click Web Modules.
4. Click Install.
5. Enter the location of the ilwwcm-localrenderingportlet-jsr.war file or click Browse to find the location of the ilwwcm-localrenderingportlet-jsr.war file.
6. Click Next.
7. Click Finish.
After the installation finishes, a message appears at the top of the screen indicating a successful installation. If there are any problems during the process, an error message appears in the Manage Web Modules page. Click the View Details link to examine the error log.
Note: There are special considerations to be made when deploying portlets in a clustered environment. Refer to Managing portlets in your cluster in the WebSphere Portal information center.
Adding the portlet to a page
By default, portlet applications and portlets are set to an active state after installation. After installing the JSR 286 Web Content Viewer, you can add the portlet to a portal page.
Portlets are added to the page by submitting a search and then selecting from the list of available portlets. Only portlets available in the portlet list can be placed on the selected page. Once you place a portlet in a row or column, you cannot modify the row or column without removing all portlets from that outlined container.
1. Log in to the portal as an administrator.
2. Click Administration in the tool bar.
3. Under Portal User Interface in the navigation tree, click Manage Pages.
4. Navigate to the page where you want to add a portlet.
5. Click the Edit Page Layout icon (small pencil) next to the page name.
6. Click Add Portlets.
7. In the list of available portlets, click the box next to the portlet title Web Content Viewer (JSR 286) to
select the portlet, then click OK. You can also search for the portlet title if the list of portlets is long.
8. Click OK.
9. Click Done.
Enabling Support for Web Content pages
Web content pages provide the ability to easily attach a site or site area to a portal. Before you can use this feature, you must enable support for Web content pages in the portal.
1. Log in to the WebSphere Application Server administrative console (http://
hostname.example.com:10027/ibm/console).
2. Click Resources → Resource Environment → Resource Environment Providers.
3. Click WP ConfigService.
4. Under Additional Properties, click Custom Properties.
5. Click New, and enter the property name wcm.pages.enabled.
6. Set the string value to true.
7. Click OK, and save the changes to the master configuration.
8. Restart the portal.
Ensure that you can use Web content page templates by following the instructions in “Enabling support
for Web content page templates.”
Enabling Support for Web Content page templates
To create new Web content pages based on template pages, you need to define a label in your portal page structure that serves as the root node for the templates. All pages created under this label are considered to be template pages.
1. Log in to the portal as an administrator.
2. Click Administration in the tool bar.
3. Under Portal User Interface in the navigation tree, click Manage Pages.
4. Click Content Root, and then click New Label.
5. Enter a title for the new label, and click OK.
6. Under Portal Settings in the navigation tree, click Custom Unique Names.
7. Navigate to the new label you created, and click the Edit icon.
8. In the Unique name field, enter wps.content.template.root, and click OK.
Enabling Support for search seedlist 1.0
If you want to use Portal Search to crawl your Web content, you must enable seedlist 1.0 support for the Portal Search crawler.
1. Log in to the portal as an administrator.
2. Click Administration in the tool bar.
3. Create the WCM_FORMAT parameter for the search service.
a. Under Search Administration in the navigation tree, click Manage Search.
b. Click Search Services, and click the Edit icon for the search service that you are using.
c. Enter WCM_FORMAT in the Parameter key field, and enter 1.0 in the New parameter value field.
d. Click Add Parameter, and then click OK.
4. Create a new search collection.
a. Click Manage Search → Search Collections.
b. Create a new search collection for your Web content. Be sure that the new search collection uses
the portal search service edited in the previous steps.
5. Enable search support for Web Content Management.
a. Log in to the WebSphere Application Server administrative console (http://hostname.example.com:10027/ibm/console).
b. Click Resources → Resource Environment → Resource Environment Providers.
c. Click WP ConfigService.
d. Under Additional Properties, click Custom Properties.
e. Click New, and enter the property name wcm.config.seedlist.version.
f. Set the string value to 1.0.
g. Click New, and enter the property name wcm.config.seedlist.servletpath.
h. Set the string value to /seedlist.
i. Optional: Click New, and enter the property name wcm.config.seedlist.metakeys , and set the string value to a comma-delimited list of your own metadata (for example, <metakey1, metakey2 ).
j. Click OK, and save the changes to the master configuration.
k. Restart the portal.
Enabling Support for Dynamic Portlet display titles
To enable the dynamic title function of the JSR 286 Web Content Viewer, you must update the portal skin that is used to render the portlet on a page. Currently the portlet title of standard portlets can only be changed dynamically during runtime using JavaScript™. To accomplish this, the corresponding Document Object Model (DOM) element that contains the portlet title must be uniquely identifiable for each portlet on the page that uses dynamic titles.
The file that controls the portlet title in the skin is Control.jsp and is located in the:
wp_profile_root/installedApps/node_name/wps.ear/wps.war/skins/html/skin_name directory (where skin_name is name of the skin, which is configured on the page).
To enable the static title to be replaced later at runtime, the title needs to be wrapped within the skin using the HTML elements or . The element must be uniquely identifiable by using the id attribute because it might appear multiple times on a portal page. In your portlet skin, locate the portletTitle tag that retrieves the static portlet title, and surround it with a HTML element. Here is an example for the default IBM skin:
<span id="title.<portal-skin:portletID/>">
<portal-skin:portletTitle>
<portal-fmt:problem bundle="nls.problem"/>
</portal-skin:portletTitle>
</span >
Note: The JSP tag is part of the JSP tag libraries provided with the portal. More information about the JSP tag libraries can be found in Tags used by the portal JSPs in the WebSphere Portal information center.
Uninstalling the portlet
To uninstall the JSR 286 Web Content Viewer, you must not only uninstall the portlet but also update the portal configuration to remove changes made when deploying the portlet.
Undoing skin modifications for dynamic portlet titles
If you enabled the ability to display dynamic portlet titles for any skins, you must undo the skin modifications you made to those skins.
Open the Control.jsp file for each modified skin and delete the HTML element that is highlighted in the sample given below.
Important: Do not delete the tags inside the element.
<span id="title.<portal-skin:portletID/>">
<portal-skin:portletTitle>
<portal-fmt:problem bundle="nls.problem"/>
</portal-skin:portletTitle>
</span>
Disabling support for Web Content pages
As part of the uninstallation for the JSR 286 Web Content Viewer, disable the support for Web content pages.
1. Disable the wcm.pages.enabled property.
a. Log in to the WebSphere Application Server administrative console (http://hostname.example.com:10027/ibm/console).
b. Click Resources → Resource Environment → Resource Environment Providers.
c. Select WP ConfigService.
d. Under Additional Properties, click Custom Properties.
e. Click the property wcm.pages.enabled.
f. Set the string value to false.
g. Click OK, and save the changes to the master configuration.
h. Restart the portal.
2. Because the label created in the portal to host the Web content page templates is no longer required, you can delete it.
a. Log in to the portal as an administrator.
b. Click Administration in the tool bar.
c. Under Portal User Interface in the navigation tree, click Manage Pages.
d. Click Content Root.
e. Locate the label with the unique name wps.content.template.root, and click the Delete icon.
f. Click OK.
Deleting the Web Module
Complete the uninstallation process by deleting the Web module for the JSR 286 Web Content Viewer. The action of deleting the Web module from the portal removes all instances of the JSR 286 Web Content Viewer portlet that have been placed on portal pages. Moreover, all files and resources related to the portlet are removed from the portal.
1. Log in to the portal as an administrator.
2. Click Administration in the tool bar.
3. Under Portlet Management in the navigation tree, click Web Modules.
4. Locate ilwwcm-localrenderingportlet-jsr.war in the list of Web modules, and click the Delete icon.
5. Click OK.
Working with Web Content Pages
A Web content page is a portal page that displays Web content from a site or site area by mapping the page to the Web content site structure in your Web Content Management system. When you add the JSR 286 Web Content Viewer to a Web content page, the portlet automatically renders the default content of the attached site or site area. In addition to displaying the default content, the JSR 286 Web Content Viewer provides a dynamic broadcasting option that selects the best matching Web content page when selecting links to other content items.
Working with Web Content page templates
To simplify the creation of Web content pages, it is possible to define pre-configured pages that can be used as templates when creating new Web content pages.
To create a new template page, navigate to the root page label you created and add a new portal page under this label. As with any portal page, you can configure the template page and add any pre-configured portlets you wish. Whenever a new Web content page is created from a template, the page layout, portlets on it, and the configuration of the portlets is copied to the new Web content page.
Important: When a new Web content page is created, no reference to the template page used to the page is maintained. This means that all changes that you apply to a template page after Web content pages have been created from this template are not propagated to any other Web content pages that already exist.
Although it is not recommended, it is possible to use existing Web content pages as template pages for new Web content pages. But you must take special care with regards to the sharing of public render parameters. Because a public render parameter is used to broadcast the context of links to other content items to the Web content page used to render the linked content item, the sharing of this parameter is limited to one specific Web content page. Otherwise all other pages containing the JSR 286 Web Content Viewer would also render the same content item after a broadcast to another page. To prevent this, by default Web content pages control the parameter sharing though the use of a unique parameter sharing scope page configuration parameter. The topic Public render parameters in the WebSphere Portal information center contains more information about public render parameter and the sharing scope. If you want to use a Web content page as template page for new Web content pages, you should either remove the param.sharing.scope parameter from the template page parameters or be aware of the implication of sharing the public wcm context render parameter across Web content pages. If no sharing scope page parameter is found on the template page used to create a new Web content page, a new unique value is used to automatically add the sharing scope parameter to the new Web content page during creation. Another aspect that must be considered when using a Web content page as a template page is the fact that the new dynamic broadcasting feature selects the first page found that is associated with the site or site area where a selected content item resides. Using a Web content page as a template page could result in selecting the template page as the page to display a content item.
Creating a Web Content page
Create a new Web content page and associate it with a Web Content Management site or site area. The simplest way to create a Web content page is to use the administration portlet provided in portal, and that is the process described here. Alternatively, you can also attach content from a Web content site or site area on any existing portal page using the Advanced options section in the page properties. Doing this will essentially make the portal page a Web content page. This also means that a unique public render parameters sharing scope is set on the page if no scope was defined yet.
1. Log in to the portal as an administrator.
2. Click Administration in the tool bar.
3. Under Portal User Interface in the navigation tree, click Manage Pages.
4. Click New Web Content Page.
5. Enter a title for the new page.
6. Optional: Enter a friendly URL that is displayed as part of the URL whenever you go to that page. The friendly URL is intended to be concise and easy to read and remember. It can also be useful to give the page a friendly URL that matches the title of the site area that is attached to the page.
7. In the Web Content Options sections, select a site or site area to associate with the page.
8. Optional: Choose a template page or select the No template option.
9. Click OK.
Dynamic Web Content Page selection
The JSR 286 Web Content Viewer provides a link broadcasting feature that leverages the Web Content Management context that is attached to a Web content page, using that context to dynamically look up the best matching Web content page to render the linked content item. When the JSR 286 Web Content Viewer is configured to use the Dynamically select a web content page link broadcasting option and a user selects a link to a content item, several tests are performed to determine which Web content page should be used to render the selected item. The same mechanism is used when previewing Web content on Web content pages or when selecting search results produced from the search seedlist 1.0 feature.
1. An ordered list with all parent site areas and sites of the selected content item is created. If the selected item itself is a site or site area, it is part of that list. The order in the list matches the order in the Web Content Management content hierarchy with the topmost parent (site) being the last item in the list and the direct parent of the selected item (or the item itself) being the first item.
2. Based on this ordered list, a lookup is performed to find the Web content page that the current user has access to and that is mapped to the first site areas or sites that has a page mapping. If multiple pages are found that map equally well to the same site or site area, the first one found is selected, unless the current page is among the pages found, in which case the current page is used.
3. If a Web content page can be determined in the previous test, the selected content item is rendered on this page. If no page could be found, the Web Content Management servlet is used to render the item.
Note: To render a content item, the dynamically selected target page needs to contain at least one JSR 286 Web Content Viewer that has been configured to receive links from other portlets.
Working with the JSR 286 Web Content Viewer
After you have installed the JSR 286 Web Content Viewer and added it a page, you can specify various configuration settings to customize the behavior and appearance of the portlet. The individual aspects of the JSR 286 Web Content Viewer that you can configure include the following:
- Selecting content to display.
- Profiling the Web Content Viewer portlet.
- Defining custom portlet titles.
- Defining inter-portlet communication settings.
- Locking configuration settings and defining default values
Using the JSR 286 Web Content Viewer
The JSR 286 Web Content Viewer is used to display local Web content on portal pages. The actual content to be rendered can be defined in the Edit Shared Settings or Configure mode of the portlet. For detailed information on individual configuration settings, refer to the online help provided with the JSR 286 Web Content Viewer.
To configure the content to be rendered by the JSR 286 Web Content Viewer, select one of the following options from the drop-down menu located in the portlet title bar.
- Select Edit Shared Settings to specify settings for all users of this instance of the portlet. Changes you make in the Edit Shared Settings mode are not reflected in other instances of the portlet.
- Select Configure to specify settings for all users of all instances of the portlet, regardless of the page on which the portlet instance appears. You can also lock some settings, so that these locked settings cannot be changed in the Edit Shared Settings mode of the portlet.
Note: Once the configuration settings of a portlet have been saved through the Edit Shared Settings mode, the default Configure mode settings are overwritten for this instance of the portlet. Any changes you make in the Configure mode will no longer affect this instance of the portlet. To restore an individual setting of the portlet to its Configure mode default value, click the Reset link next to the setting in the Edit Shared Settings mode. If you want to restore all settings to their Configure mode values, you will need to delete the portlet from the page and add it again.
Using the dynamic portlet display feature
With the JSR 286 Web Content Viewer, you can dynamically set the portlet title, which is displayed in the portlet title bar.
The portlet title can be set in the portlet's Configure mode or Edit shared settings mode. You can specify the title text either with a static phrase or with a resource bundle, which allows the portlet title to be displayed in different languages.
Note: The dynamic title is not supported with the PortalWeb2 theme.
1. Select either Configure or Edit shared settings from the drop-down menu located in the portlet title bar.
2. Select a title option.
- Select Use default title to display the title that was set for the portlet in the portal administration.
- Select Set the following title, and enter a title that should be used for all languages. If the input field is left empty, the default title is used. To explicitly set the title to be empty, you must enter a blank.
- Select Select from Resource bundle, and enter the fully qualified name of the Java resource bundle that is used to set the title, depending on the user's language (for example,
com.mycompany.myapplication.myresourcebundlename).
The structure of the resource bundle must follow the specification defined by the Java java.lang.ResourceBundle class. The key that is used to look up the title in the resource bundle is
javax.portlet.title.
The resource bundle must be located in a directory that is part of the classpath of the JSR 286 Web Content Viewer. The preferred way to do this is to create a new shared library that contains the custom resource bundle files using the WebSphere Application Server administrative console. Creating a new shared library that contains the resource bundle allows a clean separation of the custom resource bundle code from the base WebSphere Portal code. After creating a shared library, you need to add it to the classpath of WebSphere Portal application server classloader. For details about creating shared libraries and adding shared libraries to the classloader's classpath, refer to the Shared library collection topic in the WebSphere Application Server information center
Customizing error messages
If an error occurs during rendering, the JSR 286 Web Content Viewer shows an error screen. The default error screen provides a standard error message, which is shown on every type of error, and a more detailed error message. The detailed error message provides information about the cause of the error and is displayed when you click the View details link. You can customize the default error screen, and you can create your own custom JSP file that is used to display error messages.
1. Create a customized error JSP file.
a. Copy the original error.jsp file from
wp_profile_root/installedApps/node_name/PA_WCMLRingPortJSR286.ear/ilwwcm-localrende.war/jsp/html directory to create your custom erro JSP file
Almost everything in the original JSP file can be changed according to your requirements. The essential part that should be retained in your error JSP file, if it is intended to display the actual cause, is:
<%-- use errorbean from request --%>
<jsp:useBean id="errorbean" scope="request"
type="com.ibm.portal.portletui.messages.StatusMessageBean" />
<% String msg = errorbean.getMessage(); %>
The variable msg contains the message of the error. In the original error.jsp this message is only displayed in a separate popup window when a user selects View details link. In some cases it might not be desired to show this message to a user
.
2. Configure the JSR 286 Web Content Viewer to use the customized error JSP file.
a. Log in to the portal as an administrator.
b. Click Administration in the tool bar.
c. Under Portlet Management in the navigation tree, click Portlets.
d. Locate the Web Content Viewer (JSR 286) portlet.
e. Click Configure Portlet.
f. Edit the value of the parameter ERROR_JSP, and set the path to your customized error JSP file as the parameter value.
Storing JSP files: You can store JSP files in one of two locations:
- Within the wp_profile_root/installedApps/node_name/PA_WCMLRingPortJSR286.ear/ilwwcmlocalrende.war directory of your server. When storing JSP files in this directory, enter the path to your custom error JSP relative to the directory.
- Within any other Web application running on the portal. When referencing JSP files in another Web application, use the following path: contextPath;jspPath. For example: /wps/customapplication;/jsp/error.jsp.
g. Click OK, and then click OK again.
Coordination with other portlets
The JSR 286 Web Content Viewer provides support for a public render parameter, which allows coordination with other portlets and can be used to set the Web content item that should be rendered by the rendering portlet.
The public render parameter as defined by the Portlet Specification 2.0.
The fully qualified name of the public render parameter that is supported by the JSR 286 Web Content Viewer is http://www.ibm.com/xmlns/prod/datatype/content:context. The value of the public render parameter must be a valid path to a Web content item that should be rendered by the portlet.
Note: The JSR 286 Web Content Viewer only honors the public render parameter if it is configured to receive links from other portlets.
Previewing content on Web Content pages
If you have enabled support for Web content pages, you can preview content items in the authoring portlet as they will appear on Web content pages.
Before attempting to preview content, ensure that Web content pages are enabled.
Before the introduction of Web content pages, a content item could only be previewed as a standalone web page, which was as a predefined local or remote portal page that contained the standard Web Content Viewer. With the introduction of Web content pages, you can now preview a content item as part of a Web content portal page, showing the content item in a more accurate context. The content item is previewed on the Web content portal page that is associated with the content items site or site area.
Important: It is essential that there be a JSR 286 Web Content Viewer on the associated Web content page and that the portlet is configured to receive links from other portlets. Previewing content items on Web content pages does not work with the standard Web Content Viewer portlet.
1. Enable the preview function in the authoring portlet. This step only needs to be done once.
a. Select either Edit Shared Settings or Configure from the drop-down menu located in the title bar of the authoring portlet.
b. In the Previewing Options section, select Allow authors to preview content dynamically in a Web Content portal page.
c. Click OK.
2. Preview content as a Web content page.
a. Select a content item in the authoring portlet.
b. Click Preview, and then select Preview as a Web Content portal page. A new browser window opens displaying the content item on its associated Web content page.
Limitation: Currently you can only preview content, site areas, and sites on Web content pages. Other Web content item types, such as components or presentation templates, cannot be previewed as Web content pages. Also, the JSR 286 Web Content Viewer cannot be used to preview Web content with the Preview as local portal page or Preview as a remote portal page
preview options.
Differences between the JSR 286 Web Content Viewer and the standardWeb Content Viewer
There are some important differences and limitations between the JSR 286 Web Content Viewer and the existing standard Web Content Viewer portlet that is based on the IBM portlet API.
Usage of authoring tool components
When rendering authoring tool components in the JSR 286 Web Content Viewer, you must account for some changes in the way placeholder tags are specified and in the way users navigate to pages containing authoring tool components.
Authoring tool element design
In general, you use placeholder tags to display authoring tool elements:
<a href="<Placeholder tag="href"/>">
<Placeholder tag="name"/>
</a>
Using the link displayed by the rendering portlet for the authoring tool element sample given above causes the authoring user interface to open in the current Web browser window, browser tab, or within an IFrame. If the authoring tool element will be rendered by the JSR 286 Web Content Viewer and if the placeholder tag is of type href as seen above, the end attribute of the placeholder tag must be set in the element design to contain &isPopup=false.
<a href="<Placeholder tag="href" end="&isPopup=false" />">
<Placeholder tag="name"/>
</a>
If the authoring user interface accessed through the authoring tool element is opened in a new Web browser window, browser tab, or within an IFrame, it is not necessary to specify end="&isPopup=true", because true is the presumed default value.
Note: Specifying isPopup in the end attribute of the placeholder tag does not interfere with rendering in the standard Web Content Viewer portlet.
Further information on the design of authoring tool elements is available in the Authoring tools element design examples topic in the WebSphere Portal information center.
Page navigation and authoring tool components
Currently when a user clicks on a link that refers to an authoring tool component and the link isrendered in the JSR 286 Web Content Viewer, the user is redirected to a portal page hosting the authoring portlet rather than opening the authoring user interface within the rendering portlet itself. When the user finishes working in the authoring user interface, the user has to navigate back to the new rendering portlet manually to see the changes. Because of this behavior it is recommended that you adapt the design of your authoring tool elements to
open the authoring user interface in a new browser window. In this way the user does not need to navigate back to the previously shown rendering portlet and must only close the popup window and refresh the rendering portlet manually to see the changes.
URL generation using PathCmpnt and URL Cmpnt tags
There are some special considerations to keep in mind when using URLCmpnt and PathCmpnt tags to create URLs to other Web content items from within your content.
Using the URLCmpnt tag
The URL component tag URLCmpnt can be used to create URLs to content items in a presentation template. If the attribute mode="portal" is set, the content item is displayed through a content viewer portlet. URLs to the JSR 286 Web Content Viewer differ from URLs to the standard Web Content Viewer rendering portlet. When the URLCmpnt tag is used in content rendered in the JSR 286 Web Content Viewer, the tag creates URLs in an updated format that the portlet understands. When the tag is used from a standard rendering portlet, the tag creates URLs in the older format. This means that the URLCmpnt tag cannot be used to link from the standard Web Content Viewer to the JSR 286 Web Content Viewer or vice versa.
Using the PathCmpnt tag
The path component is used to create the base part of a URL in Web content. Typically, the base part is extended by some string that identifies the content to be displayed. If the path component is used inside the context of a JSR 286 Web Content Viewer, the generated URL has the updated URL format and thus cannot be displayed with the existing standard Web Content Viewer.
Adding query parameters to URLs
The standard Web Content Viewer uses regular URL parameters to get information about which content to display. TheJSR 286 Web Content Viewer does not support URL parameters, since this would be against the JSR 286 portlet specification. Instead the JSR 286 Web Content Viewer makes use of render parameters to specify the content to be displayed. Typically render parameter handling is done by the portlet internally. But in some cases an application developer needs to be aware of how render parameters are handled–for example when creating a custom JSP file to be used with a Web Content Management JSP component. When the JSP component is processed in the context of the standard Web Content Viewer, request parameters can be directly read from the request object. However, in the context of the JSR 286 Web Content Viewer, this is no longer possible. In this case the parameter must be read from the RenderingContext object in the Web Content Management API. The RenderingContext object provides the method getRequestParameters for this purpose.
Note: Adding URL parameters to a regular portal URL will not affect the JSR 286 Web Content Viewer. For this purpose you must use the URLCmpnt or PathCmpnt tag. Additional URL query parameters, like those used with the standard Web Content Viewer, can be appended to the URLs generated by these tags.
Known issues
We will list a history of known issues here. Some of these issues are no longer relevant since you must now be running version 6.1.0.3 or later.
After upgrading to CF25 link broadcasting no longer works and you get a "application error" page and an error is thrown in the SystemOut.log file
The error you see is:
java.lang.NullPointerException
at com.ibm.workplace.wcm.resolver.WCMPathResolutionService.resolve(WCMPathResolutionService.java:328)
at com.ibm.workplace.wcm.resolver.WCMResolutionService.resolve(WCMResolutionService.java:130)
at com.ibm.portal.resolver.helper.CORResolutionService.resolve(CORResolutionService.java:113)
Resolution is to contact IBM support and get and install the iFix PM05592 for CF25.
If you have done an upgrade from WP 6100 to WP 6101 one of the JSP tag library files does not update correctly
The following exception will be seen in the SystemOut.log file
com.ibm.ws.jsp.translator.JspTranslationException:
JSPG0227E: Exception caught while translating /jsp/html/config.jsp: /jsp/html/config.jsp(200,28) -->
JSPG0006E: Custom Tag is missing required attribute uri
Resolution is to install PK79560 after upgrading to WP 6.1.0.1 and before installing the portlet.
It has been reported that in some cases the problem was not resolved with the fix. To check if the fix was successfully
applied compare files \base\wp.resolver\wp.resolver.api\shared\app\WEB-INF\tld\resolver-v6.tld and \shared\app\WEB-INF\tld\esolver-v6.tld.
Both files must have the same content. If this is not case copy the file resolver-v6.tld from \base\wp.resolver\wp.resolver.api\shared\app\WEB-INF\tld\
to \shared\app\WEB-INF
After upgarded from WP 6100 to WP 6101 you see an error
One of the required jar files was not updated correctly which causes the following exception
Caused by: java.lang.NoClassDefFoundError: com.ibm.portal.portletui.messages.StatusMessageBean
Resolution is to re-install the WebSphere Portal and Web Content Management V6.1, fix pack 1 with the
latest Portal Update Installer (PUI). PUI versions before "20081111" had a problem and were not installing the
file "PortalServer\base\wp.portletui.messages.api\shared\app\wp.portletui.messages.api.jar" even though the file
is contained inside jar file of the fixpack.
You can check the version of the PUI by executing updatePortal.bat -help (updatePortal.sh -help)
If you have done an upgrade to CF11 and receive a NullPointerException whenever you click on a content link within the JSR 286 rendering portlet
The portlet will show:
"There has been an application error",
The following exception will be seen in the SystemOut.log file
java.lang.NullPointerException at com.ibm.workplace.wcm.resolver.
WCMPathResolutionService.resolve(WCMPathResolutionService.java:317)
Resolution is to install CF13 or the latest cumulative iFix.
Error after enabling the develop-mode-startup-performance
You have enabled the develop-mode-startup-performance and the dojo dialogs in the JSR 286 Rendering Portlet and 'Content Page' folder selection, return the following error:
Error 400: EJPPH0006E: The resolution of a URI failed. Refer to the stack trace for more detailed information.
This error is due to the WCM Authoring UI not being started. Either add the 'PA_WCM_Authoring_UI' application
to the exclusion list OR run ConfigEngine task "disable develop-mode-startup-performance"
The Multilocale context-processor delivered with the Multilocale whitepaper isn't selectable within the portlet configuration
Please see the whitepaper download page for an updated version of the sample code that includes a newer 286 specific version.
After registering context-processor, you see errors on every other start up.
You have registered a context-processor and now portal fails on every second startup with the
following error message: java.io.FileNotFoundException: \temp\\WebSphere_Portal\_extensionregistry\XXXXXX.ser
Ensure that the 'version' attribute of the 'plugin' tag within your plugin.xml (of the context-processor) is defined to three
places, ie. 1.0.0 not 1.0.
<plugin id="MLContextProcessor.id" provider-name="IBM" version="1.0.0" name="MLContextProcessor">
<extension id="MLContextProcessorPlugin" point="com.ibm.workplace.wcm.api.ContextProcessor">
<processor class="com.ibm.workplace.wcm.sample.contextprocessor.ML ContextProcessor"/>
</extension>
</plugin>
Multilocale context-processor throws a nullpointer exception
You receive the following error with the Multilocale context-processor delivered with the Multilocale whitepaper.
java.lang.NullPointerException at com.ibm.workplace.wcm.sample.contextprocessor.MLContextProcessor.
process(MLContextProcessor.java:136)
You receive this error because the JSR-286 rendering portlet does not create a session during rendering. As the multilocale processor always requires a session you need to set the following Portlet preference "WCM_CREATE_SESSION_FOR_CONTEXT_PROCESSOR" to force the
JSR-286 rendering Portlet to create a session if a context processor plugin was found.
In order to do this use the Manage Portlets administration Portlet in the Portal administration area and configure the
Web Content Viewer (JSR 286) portlet and create or update the preference with the key
"WCM_CREATE_SESSION_FOR_CONTEXT_PROCESSOR" and set a value of "true".
Note: In the latest version of the JSR 286 Web Content Viewer setting the "WCM_CREATE_SESSION_FOR_CONTEXT_PROCESSOR" is no longer required.
A session is created on demand and setting an extra portlet preference is unnecessary.
Clicking a link to a WCM item in the JSR 286 Web Content Viewer causes the content to render in all JSR 286 Web Content Viewer portlets
You have clicked on a link to a content item and the content item was rendered on one page, but you then go to another page and the JSR-286 on that page shows the same content as selected on the page before.
The JSR-286 based Web Content Viewer portlet uses a public render parameter as defined by the portlet standard to holds its context information. By default all public render parameters are shared across pages in Portal.
What happens is that when you select the link to the item on the first page a public render parameter is set and that parameter tells the JSR-286 Web Content Viewer portlet, which is configured to listen to broadcast links from other portlets, to render the content item that was set in the public render parameter. When you then switch to the next page, the public render parameter is maintained. Thus the JSR 286 Web Content Viewer portlet on that page will use the same public render parameter and will render the same content.
To solve this you have two options:
- Set the parameter "param.sharing.scope" on both pages to a unique value. This parameter is documented here Public Render Parameter
and controls how public render parameter for JSR portlet are scope. To have a unique scoping simply set the value of this parameter to any arbitrary but unique value.
- Use web content pages instead of "normal" portal pages. As for web content pages the param.sharing.scope parameter is set to a unique value automatically during page creation
How to ensure that the JSR 286 Web Content Viewer portlet parameters are stored in the URL and not in the session for full bookmarkability
You may notice that browsing WCM content using the JSR 286 Web Content Viewer works as expected, however if you copy a url from the address bar to share, you will find that it does not open the expected content when used in another browser.
The document Storing Render Parameters In URL explains how to work pass this issue.
Troubleshooting
If you encounter issues using the JSR 286 Web Content Viewer, the first thing you should do is:
- Ensure you have the latest version of the portlet installed if you are running version 6.1.0.3 or 6.1.0.4. If not, install the latest version. The cumulative fixes for 6.1.0.3 and 6.1.0.4 do not contain updates for the JSR 286 Web Content Viewer. Updates to the portlet will only made via the catalog and you must manually update the portlet.
- Ensure you have the latest WCM cumulative fix installed if if you are running 6.1.5 or 6.1.5.1. The cumulative fixes for the feature packs 6.1.5 and 6.1.5.1 do contain fixes for the JSR 286 Web Content Viewer and will updat ethe installed portlet when running the update-wcm-fp615 task.
Traces
If you are having issues with JSR 286 Web Content Viewer and do not see the issue listed in this article and it is not resolved by the latest fixes or latest portlet version you will need to enable tracing and contact IBM Support. The traces related to the portlet that you will need are:
com.ibm.workplace.wcm.app.ui.portlet.standard.*=all
com.ibm.workplace.wcm.app.ui.portlet.extensions.*=all
com.ibm.workplace.wcm.resolver.*=all
com.ibm.workplace.wcm.services.addressability.*=all
Please see the JSR 286 Web Content Viewer Mustgather document for additional information you will need to collect:
JSR 286 Web Content Viewer Mustgather 
Technotes
Can the new standard search seedlist 1.0 feature be used with the IBM Portal API Web Content Management rendering portlets?
JSR 286 Web Content Viewer WCM page resolution for dynamic broadcasting fails after Cf 25
|
|
|
|
| Version 146 |
May 27, 2011 |
8:20:51 AM |
by Matthew K Thomas  |
|
|