// now that the sling main servlet is registered with the HttpService
// and initialized we can register the servlet context
if (getServletContext() == null || getServletContext().getMajorVersion() < 3) {
slingServletContext = new SlingServletContext(bundleContext, this);
} else {
slingServletContext = new SlingServletContext3(bundleContext, this);
}
// register render filters already registered after registration with
// the HttpService as filter initialization may cause the servlet
// context to be required (see SLING-42)