* @throws InstantiationException
* @throws IllegalAccessException
*/
protected EventListener newListenerInstance(WebAppContext context,Class<? extends EventListener> clazz) throws Exception
{
ListenerHolder h = context.getServletHandler().newListenerHolder(Source.DESCRIPTOR);
EventListener l = context.getServletContext().createInstance(clazz);
h.setListener(l);
context.getServletHandler().addListener(h);
return l;
}