webModule.getSharedContext().put(WebModule.WEB_APP_INFO, webAppInfoBuilder);
//Add context attributes and parameters
if (tomcatWebApp.isSetContext()) {
TomcatContextType context = tomcatWebApp.getContext();
NamedNodeMap namedNodeMap = context.getDomNode().getAttributes();
for (int i = 0; i < namedNodeMap.getLength(); i++) {
Node node = namedNodeMap.item(i);
String attributeName = node.getNodeName();
if (INGORED_CONTEXT_ATTRIBUTE_NAMES.contains(attributeName.toLowerCase())) {
if (log.isWarnEnabled()) {
log.warn("Context attribute " + attributeName + " in the geronimo-web.xml is ignored, as it is not support or Geronimo has already configured it");
}
continue;
}
if (contextAttributes.containsKey(attributeName)) {
if (log.isWarnEnabled()) {
log.warn("Context attribute " + attributeName
+ " on the context element in geronimo-web.xml is ignored, as it has been explicitly configured with other elements in the geronimo-web.xml file");
}
continue;
}
contextAttributes.put(node.getNodeName(), node.getNodeValue());
}
for (TomcatParameterType parameterType : context.getParameterArray()) {
if (webAppInfo.contextParams.containsKey(parameterType.getName()) && !parameterType.getOverride()) {
if (log.isWarnEnabled()) {
log.warn("Context parameter from geronimo-web.xml is ignored, as a same name context paramter " + parameterType.getName() + " = "
+ webAppInfo.contextParams.get(parameterType.getName()) + " in web.xml, configure override with true to make the value take effect.");
}