Resolving content URLs to an external system

When WebSphere Commerce is integrated with an external content management system, URLs for content in the external system can be resolved using the wcst:resolveContentURL tag.

URL references or links to content in an external content management system might not be fully qualified, or resolved, URLs. These URLs can contain one or more tokens, such as the host name for the external system. These tokens can be resolved differently in an authoring environment than in a production environment.

The wcst:resolveContentURL JSTL tag is used to convert the URL to an external system. The tag converts the URL to a URL that is valid for the current environment and for the context where the retrieved content is being used. If the specified unresolved URL cannot be resolved as a content URL, then the specified URL path is returned unchanged. This tag is used by the store pages where the retrieved content is being rendered. This tag can also be used when a punch-out integration with an external content management system is not enabled. When this tag is included on a store page to resolve content URLs from an external system, the following attributes can be defined for the wcst:resolveContentURL tag.

Any unresolved content URLs must have the http://[cmsHost] prefix token. These unresolved URLs are then resolved with the com.ibm.commerce.content.commands.ResolveContentURLCmd task command. The default implementation of the task command replaces the token with a URL prefix value. This value is determined by appending a configured path value to a configured host name. For more information about configuring the default implementation of this task command, see com.ibm.commerce.content.commands.ResolveContentURLCmdImpl. The content URL is resolved from the specified attachment asset path and stored in the variable named content URL.

The URLs are store with the following format, http://[cmsHost]/contentPath. The resolveContentURL tag replaces the http:/[cmsHost] prefix with the host name and path for the external system that is configured in the STORECONF database table.