SLING-7764 The starting up page content should be customizable
To provide a custom page you may install a fragment bundle to this host
bundle that contains a custom_index.html file in the root of the bundle.
diff --git a/README.md b/README.md
index 62213a9..d3a64f8 100644
--- a/README.md
+++ b/README.md
@@ -6,4 +6,6 @@
Provides a module providing a nicer user experience during startup of the Sling Starter application.
+The content of the starting page may be customized for the purposes of branding or providing more specific site specific information. To provide a custom page you may install a fragment bundle to this host bundle that contains a custom_index.html file in the root of the bundle.
+
This module is part of the [Apache Sling](https://sling.apache.org) project.
diff --git a/src/main/java/org/apache/sling/starter/startup/impl/StartupFilter.java b/src/main/java/org/apache/sling/starter/startup/impl/StartupFilter.java
index ce3f6f3..d3de5fa 100644
--- a/src/main/java/org/apache/sling/starter/startup/impl/StartupFilter.java
+++ b/src/main/java/org/apache/sling/starter/startup/impl/StartupFilter.java
@@ -41,7 +41,12 @@
private String content;
StartupFilter() {
- InputStream is = StartupFilter.class.getClassLoader().getResourceAsStream("index.html");
+ // try a custom page (provided by a fragment bundle) first.
+ InputStream is = StartupFilter.class.getClassLoader().getResourceAsStream("custom_index.html");
+ if (is == null) {
+ // try the standard page
+ is = StartupFilter.class.getClassLoader().getResourceAsStream("index.html");
+ }
if (is != null) {
BufferedReader buffer = null;
try {