The Java Server Pages (JSPs) for a multisite application must be coded in a site-aware way. A key aspect of making pages site-aware involves changing the current site context so, for example, a certain area of a page on site A can display products from site B.

To change the site context on a portion of a page, you use the atg.droplet.multisite.SiteContextDroplet. This servlet bean takes a site ID as an input parameter, changes the site context to the site with that site ID, and renders output using the new site context. It then restores the site context to what it was before the droplet was invoked, so the remainder of the page is rendered using the original site context.

In addition to SiteContextDroplet, the atg.droplet.multisite package includes a number of other servlet beans for building site-aware JSPs. These include:

Site Scope

In addition to the multisite-specific servlet beans mentioned above, several other servlet beans and form handlers have properties for determining the sites they apply to. The sites are specified using one of these properties:

Only one of these properties should be set. If both are set, siteScope is ignored. If neither property is set, the component is applied to all sites.

Servlet beans that have these properties also have siteIds and siteScope input parameters that can be used to override the property values on an individual page. Form handlers with these properties can override the configured values using hidden input fields.


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