Add the Context Expression Extension to your Presentation Server to enable Web developers to retrieve and respond to the published context expressions.
Before you begin
To add the Context Expression Extension to your Presentation Server:
- You must have the API Server Role set up on your Presentation Server
- You must have Context Engine Cartridge set up on your Presentation Server
Procedure
- On your Presentation Server, navigate to the bin\lib\ (.NET) or WEB-INF/lib/ (Java) subdirectory of your Web site.
- On your SDL Tridion installation media, navigate to Content Delivery\roles\context\java\lib\.
- Copy the following files from the installation media to the server:
- cx_api.jar
- cx_ambient.jar
- On your SDL Tridion installation media, navigate to Content Delivery\roles\deployer\java\lib\.
- Copy the file cd_undo.jar from your installation media to your Presentation Server.
- On your SDL Tridion installation media, navigate to Content Delivery\roles\context\java\third-party-lib\.
- Copy the file gson.jar from the installation media to the server.
- Navigate to the bin\config\ (.NET) or WEB-INF/classes/ (Java) subdirectory of your Web site.
- Open cd_storage_conf.xml for editing.
- In the
<Storages> section, find the <StorageBindings> section and add the following inside it:
<Bundle src="undo_dao_bundle.xml" />
- Save and close cd_storage_conf.xml.
- Open cd_ambient_conf.xml for editing.
- In the
<Cartridges> section, add the following:
<Cartridge File="cx_ambient_cartridge.xml" />
- Save and close cd_ambient_conf.xml.
- Open cd_dynamic_conf.xml for editing.
- In this file, ensure the presence of a
<URLMappings> section as the first child element of the root element, containing a series of mappings from a Publication ID to its corresponding URL. Create a mapping for every Publication that will contain Target Groups defined by context expressions. Here is an example <URLMappings> section, which maps the Publication with ID 23 to the path http://example.com:91/local-fr:
<URLMappings>
<StaticMappings>
<Publications>
<Publication Id="23">
<Host Domain="example.com" Port="91" Protocol="http" Path="/local-fr " />
</Publication>
</Publications>
</StaticMappings>
<StorageMapping IdentifyPublicationByProperty="publicationUrl" />
</URLMappings>
- Save and close cd_dynamic_conf.xml.
- Restart your Web site.