In this article, I'll illustrate how to configure OSGi to root-map from /projects.html (default) to /welcome.html in #AEM6. When you freshly installed your #AEM6 and logged into author instance, you will land on the /projects.html page, Figure 1. Some might prefer to land on the /welcome.html page, Figure 2. How to do that, you added: /apps/myproject/config.author/com.day.cq.commons.servlets.RootMappingServlet.config.xml, and add the XML codes in the Code Fragment 1 below to the ...config.xml file.

 

Code Fragment 1

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="sling:OsgiConfig"
    rootmapping.target="/welcome.html"/>

/projects.html page


Figure 1.

/welcome.html



Figure 2.