Skip Headers
Oracle® Fusion Middleware Administering Oracle WebCenter Content
11g Release 1 (11.1.1)

Part Number E26692-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

15 Mapping URLs

This chapter provides information about using the WebUrlMapPlugin component to map shortened URLs to other URLs in support of the Content Server use of the Oracle WebLogic Server web server to filter pages through a web browser.

This chapter includes the following topics:

15.1 WebUrlMapPlugin Component

WebCenter Content uses an Oracle WebLogic Server, which has a built-in web server, to filter pages through a web browser. User requests are authenticated with the Oracle WebLogic Server user store, or other configured user store, and communicated with the Content Server instance.

The WebUrlMapPlugin component enables you to map shortened URLs to other URLs using a substitution script for the mapping, which also enables you to map long URLs to abbreviated versions. The WebUrlMapPlugin component is installed (enabled) by default with the Content Server instance.

15.2 Script Construction

The shortened URLs that you can create generally use the following format:

http://myhostexample.com/prefix/suffix

The actual mapping process is based on the part of the URL that follows the host name portion. To resolve the shortened URL, the Content Server instance compares the prefix to those in the list of defined WebUrlMapPlugin entries. If a match exists, the Content Server instance uses the map script that corresponds to the matching prefix to display the applicable document or Content Server page. For more information about the suffix, see Section 15.3.

To construct a URL mapping entry using the WebUrlMaps page, you must establish a prefix and define the corresponding map.

Prefix

The prefix portion of the mapping entry is any abbreviation you want to use to identify URLs of a certain form. For example, if you want your short URL to return the dynamic conversions of documents, you can use idc as your prefix (for example, the abbreviated form of dynamic converter).

When you create your prefix, do not enter a slash (/) character at the beginning of it because the Content Server instance removes the first slash from the incoming URL before the prefix test is performed.

Caution:

Include a slash (/) at the end of your URL map prefix. Otherwise, your mappings can apply to many more URLs and interfere with standard Content Server operations.

Map

The map portion of the mapping entry is the Idoc Script code that the Content Server instance uses to resolve the shortened URL. You can use substitution tags (<!--$variable-->) in the map portion. Examples include:

<!--$cgipath-->
<!--$internetuser-->
<!--$suffix-->

These substitution tags are variables that refer to the applicable parameters of a URL.

Simple 'if' constructions are also supported. For example, the following script segment performs a test to determine whether a value exists and is not empty:

<!--$if myconfigvar-->something<!--$endif-->

15.3 Supported Variables for Referencing

The map portion of the URL mapping entry uses the following standard variables for referencing:

15.4 Add/Edit URL Mapping Entries

To add or edit URL mapping entries:

  1. On the Content Server home page, choose Administration, then WebUrlMapPlugin.

  2. In the WebUrlMaps page, enter the appropriate values in the Prefix and Map fields to edit the existing mapping entries, or define new entries, or both.

  3. Click Update. The page refreshes and the Prefix and Map field values are saved. If all of the displayed fields are populated, two additional Prefix and Map field pairs are displayed after the page is redisplayed.

    Important:

    The WebUrlMapPlugin feature is designed to support hundreds of mapping entries. However, be aware that thousands of mapping entries will impact performance of the web server.

15.5 Mapping Examples

The following examples demonstrate mapping scripts and techniques.

15.5.1 Info Update Form

You can define a web URL mapping script that enables you to create a shortened URL to generate the Info Update Form for existing content items. You can write the mapping script to allow users to enter any identification variable for a particular document. For example, all URLs with the following format:

http://myhostexample.com/u/mydoc_parameter

can be mapped to the URL:

http://myhostexample.com/idcm1//idcplg?IdcService=GET_UPDATE_FORM&dDocName=mydocumentname

To map URLs, define the following web URL map entry using the WebUrlMaps page:

  • Prefix:

    u/
    
  • Map:

    <!--$cgipath-->?IdcService=GET_UPDATE_FORM<!--$suffix-->&myparam=<!--$myparam-->
    

15.5.2 Dynamic Conversion

Dynamic Converter must be installed for this URL mapping example to work. For information on Dynamic Converter, see Oracle Fusion Middleware Managing Oracle WebCenter Content.

You can define a web URL mapping script that enables you to create shortened URLs to various dynamic conversions of documents. For example, all URLs with the following format:

http://myexamplename.com/dc/mydocumentname

can be mapped to the URL:

http://myhostexample.com/idcm1/idcplg?IdcService=GET_DYNAMIC_CONVERSION&dDocName=mydocumentname&RevisionSelectionMethod=LatestReleased

To map URLs, define the following web URL map entry using the WebUrlMaps page:

  • Prefix:

    dc/
    
  • Map:

    <!--$cgipath-->?IdcService=GET_DYNAMIC_CONVERSION&dDocName=<!--$suffix-->&RevisionSelectionMethod=LatestReleased
    

15.5.3 CGI parameters

You can also directly reference CGI parameters. For example, URLs with the following format:

http://myhostexample.com/dcp/mydocumentname?myparam=myvalue

can be mapped to the URL:

http://myhostexample.com/idcm1/idcplg?IdcService=GET_DYNAMIC_CONVERSION&dDocName=mydocumentname&RevisionSelectionMethod=LatestReleased&myparam=myvalue

To map URLs, define the following web URL map entry using the WebUrlMaps page:

  • Prefix:

    dcp/
    
  • Map:

<!--$cgipath-->?IdcService=GET_DYNAMIC_CONVERSION&dDocName=<!--$suffix-->&RevisionSelectionMethod=LatestReleased&myparam=<!--$myparam-->