Use URL templates to link Legacy REST Web Services URLs to JSPs. URL templates use regular expressions to recognize input parameters and pass them to a JSP.

URL templates are Nucleus components that are used by the URL recoding feature of the Oracle ATG Web Commerce platform. See comprehensive information about that feature in the ATG Platform Programming Guide.

To create a URL template component, add a URL template properties file in the configuration path for the Legacy REST Web Services. For example, you could configure a URL template in the file shown below.


An example URL template component properties file is shown below.

  • The urlTemplateFormat property defines the application path of the URL that Legacy REST Web Services clients will access. It includes a comma separated list of parameters that the client must supply.

    The URL format must begin with /rest/service. After that, it must contain the Nucleus path of an existing component in your application. It does not matter which component you choose.

  • The indirectRegex property matches parameters that are supplied in the URL application path. The URL recoding feature will pass these parameters to the JSP.

  • The regexElementList property provides information about each parameter. The two parameters shown in this example are a repository item identifier and a simple string.

  • The forwardUrlTemplateFormat property configures the JSP file that the Legacy REST Web Services interface will invoke. The application path includes the context root of the Web application (mymodule in the example). It also includes each parameter that was identified in the URL template as URL parameters that will be passed to the JSP.


# Url template format

# Regex that matches above format

# Regex elements
regexElementList=item | id | /atg/AnyComponent\:product, mystring | string

# Forward Url template

# Web App registry

Note: See comprehensive information about configuring the URL recoding feature of the Oracle ATG Web Commerce platform in the ATG Platform Programming Guide.

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices