Thursday, April 16, 2009

URL encoding spaces in WCM_GLOBAL_CONTEXT with %20 will fail.

The IBM Web Content Management (WCM) local rendering portlet will always render the default content configured to it .However. if you want to overwrite a WCM local rendering portlet with new content, place the following string at the end of the link to the page:


If the WCM library, site, site area, or content contains spaces in the name , using "%20" as URL encoding for spaces fails to render the specified content in WCM_GLOBAL_CONTEXT and therefore, the local rendering portlet will render the default content.

The library name is "Intranet library". Encoding this library name is "Intranet%20library". WCM_GLOBAL_CONTEXT is used with the following URL encoding:


Clicking the link with "WCM_GLOBAL_CONTEXT" added will cause the local rendering portlet to render only the default content. It will fail to render new_content from "Intranet library".

Exceptions in the systemOut.log would be:
com.aptrix.pluto.renderer.BadPathInfoException: IWKPL1453X: Exception occured while processing request: /Intranet%20library/site/sitearea/new_content/



at com.aptrix.pluto.renderer.RenderContext.(



In the above example, "Intranet%20library" will be encoded again to "Intranet%2520library", where "%25" is the encoded value for "%". This means that "%25" will lead to the new encoded string, "Intranet%2520library".

Since there is no library named "Intranet%20library" (the decoded value of "Intranet%2520GSC"), it will fail.

Resolving the problem
Use the plus sign ("+") instead of "%20".
For example, use following URL encoding in WCM_GLOBAL_CONTEXT:


This will overwrite the default content of the local rendering portlet with new_content from Intranet library.