HST Configuration Model Loading
The Delivery Tier loads an HST configuration model for each Site web application. The Platform web application loads all configuration models and exposes them to Site web applications through the HstModelRegistry. The HstModelRegistry provides access to the configuration model for the current Site web application and for other Site web applications.
The Platform loads the configuration model, but the required classes must also be available to the Site web applications. To support this, you must load the HST API dependencies using a shared class loader. Add the HST API dependencies to the container's shared library. Do not package the HST API dependency in the CMS WAR file. If the dependency is missing, the HstFilter logs an error at startup indicating that container services are not initialized. The CMS remains available, but channels will not display.
Access the HstModel in a Site Web Application
To access the HST configuration model for the current Site web application, use the following approach:
HstModelRegistry hstModelRegistry = HippoServiceRegistry.getService(HstModelRegistry.class); final HstModel siteModel = hstModelRegistry.getHstModel("/site");
Use the context path name to retrieve the correct HstModel.