final String definition = createDefinition(request.getSitemapURIPrefix(),
sitemapLocation.substring(pos+1),
getBeanIncludes(parentContext, contextUrl, config),
getPropertiesIncludes(parentContext, contextUrl, config),
getGlobalSitemapVariables(config));
final ChildXmlWebApplicationContext context = new ChildXmlWebApplicationContext(contextUrl,
definition);
context.setServletContext(servletContext);
context.setParent(parentContext);
if ( classloader != null ) {
context.setClassLoader(classloader);
}
context.refresh();
return context;
}