slash = pathInfo.length();
}
final Locale locale = getConfiguredLocale(request);
final String label = pathInfo.substring(1, slash);
AbstractWebConsolePlugin plugin = getConsolePlugin(label);
if (plugin != null)
{
final Map labelMap = holder.getLocalizedLabelMap( resourceBundleManager, locale, this.defaultCategory );
final Object flatLabelMap = labelMap.remove( WebConsoleConstants.ATTR_LABEL_MAP );
// the official request attributes
request.setAttribute(WebConsoleConstants.ATTR_LANG_MAP, getLangMap());
request.setAttribute(WebConsoleConstants.ATTR_LABEL_MAP, flatLabelMap);
request.setAttribute( ATTR_LABEL_MAP_CATEGORIZED, labelMap );
request.setAttribute(WebConsoleConstants.ATTR_APP_ROOT,
request.getContextPath() + request.getServletPath());
request.setAttribute(WebConsoleConstants.ATTR_PLUGIN_ROOT,
request.getContextPath() + request.getServletPath() + '/' + label);
// deprecated request attributes
request.setAttribute(ATTR_LABEL_MAP_OLD, flatLabelMap);
request.setAttribute(ATTR_APP_ROOT_OLD,
request.getContextPath() + request.getServletPath());
// fix for https://issues.apache.org/jira/browse/FELIX-3408
ensureLocaleCookieSet(request, response, locale);
// wrap the response for localization and template variable replacement
request = wrapRequest(request, locale);
response = wrapResponse(request, response, plugin);
plugin.service(request, response);
}
else
{
final String body404 = MessageFormat.format(
resourceBundleManager.getResourceBundle(bundleContext.getBundle(), locale).getString(