On application startup and after each site configuration deployment, the SiteURLManager collects the URLs for all registered sites:

The SiteURLManager then processes the list of URLs as follows:

  1. Creates a map keyed by the collected URLs, that pairs URLs with site IDs. If it finds any duplicate URLs, it logs an error and removes the duplicates.

  2. Creates a list of all URL keys in the map, which organizes URLs in the following order of precedence:

    • Full URLs: contain context roots, domain and paths.

    • Domain names only.

      All domain names have equal precedence: a URL that consists only of a parent domain is equal to a URL that includes subdomains. Thus, foo.com and bar.foo.com are regarded as equal.

    • Paths only. Path-only URLs are sorted according to the number of levels in the path. Thus, /foo/bar has precedence over /foo.

    For example, URLs might be ordered as follows:


  3. Creates an empty cache for storing requested URL-site mappings.

  4. Creates a map keyed by all site IDs mapped to URLs, for reverse lookups. This map is used primarily by Oracle ATG Web Commerce servlet beans in order to generate links from JSPs. The method SiteURLManager.getProductionSiteBaseURL() also uses it to get a production site URL from the supplied site ID.

    The SiteURLManager executes an array of SiteBaseURLProcessor components, specified through its siteBaseURLProcessors property. These control how URLs are processed. For more information, see Absolute URL Generation later in this chapter.

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