name, value);
for (int i = 0; i < listeners.length; i++) {
if (!(listeners[i] instanceof ServletContextAttributeListener))
continue;
ServletContextAttributeListener listener =
(ServletContextAttributeListener) listeners[i];
try {
if (replaced) {
context.fireContainerEvent(
ContainerEvent.BEFORE_CONTEXT_ATTRIBUTE_REPLACED,
listener);
listener.attributeReplaced(event);
context.fireContainerEvent(
ContainerEvent.AFTER_CONTEXT_ATTRIBUTE_REPLACED,
listener);
} else {
context.fireContainerEvent(
ContainerEvent.BEFORE_CONTEXT_ATTRIBUTE_ADDED,
listener);
listener.attributeAdded(event);
context.fireContainerEvent(
ContainerEvent.AFTER_CONTEXT_ATTRIBUTE_ADDED,
listener);
}
} catch (Throwable t) {