Static Webapp Resources Locations and Best Practices

Overview

This page explains the available locations for static web application resources in Bloomreach Content (formerly Hippo) projects. It outlines when to use each location and provides best practice recommendations.

Resource Locations

In Bloomreach Content, the delivery web application uses static resources such as:

  • CSS stylesheets
  • JavaScript files
  • Images
  • Font files
  • JSP templates
  • Freemarker templates

You can store and serve static resources from two primary locations:

  • The site web application in src/main/webapp
  • The content repository as Web Files, typically bootstrapped from the repository-data-webfiles module

Most projects use both locations. The appropriate location depends on the type of resource and project requirements. This page provides guidance for selecting the right location.

Note: Files managed as assets in the content repository are considered dynamic resources, not static resources.

Comparison of Resource Locations

The table below summarizes the characteristics, recommended use cases, and examples for each static resource location.

LocationCharacteristicsSuitable UsesExample Uses
site webapp- Follows standard Java practices
- Packaged with the site web application
- Updates require a release and redeployment
- Resources that change infrequently
- Large resources (exceeding the web files size limit)
- JSP templates (must be packaged with the site webapp)
- JSP templates
- Images
- Fonts
Web Files in content repository- Bloomreach-specific approach
- Packaged with the cms web application
- Bootstrapped to the repository
- Can be updated without redeploying the web application
- Optimized for browser caching
- Supports Switch Template for Freemarker templates
- Automatic synchronization with the file system in local development
- Resources that change frequently
- Small resources (within the web files size limit)
- Multiple alternative Freemarker templates for the same component (Switch Template)
- Freemarker templates
- CSS stylesheets
- JavaScript files

Best Practice Guidelines

  • Store large or infrequently updated resources in the site webapp.
  • Use Web Files in the content repository for resources that require frequent updates or support for multiple template variants.
  • Always package JSP templates in the site webapp.
  • For Freemarker templates, use Web Files to take advantage of Switch Template support and easier updates.
  • Consider browser caching and deployment workflows when deciding where to store each resource.

For more information, see the Web Files introduction and Web Files configuration.

Share Feedback
Page: /build/web-application/static-webapp-resources
Section: Build
Category *