// Notify interested application event listeners
Object listeners[] = context.getApplicationEventListeners();
if ((listeners == null) || (listeners.length == 0))
return;
ServletRequestAttributeEvent event = null;
if (replaced)
event =
new ServletRequestAttributeEvent(context.getServletContext(),
getRequest(), name, oldValue);
else
event =
new ServletRequestAttributeEvent(context.getServletContext(),
getRequest(), name, value);
for (int i = 0; i < listeners.length; i++) {
if (!(listeners[i] instanceof ServletRequestAttributeListener))
continue;