We've started a project using
ICEfaces at work, and I recently ran into some warnings deploying our app to Tomcat 6.0.18:
Aug 21, 2008 3:02:48 PM org.apache.catalina.core.StandardContext
addApplicationListener
INFO: The listener "com.sun.faces.config.ConfigureListener" is already
configured for this context. The duplicate definition has been ignored.
Aug 21, 2008 3:02:48 PM org.apache.catalina.core.StandardContext
addApplicationListener
INFO: The listener "com.icesoft.faces.util.event.servlet.ContextEventRepeater"
is already configured for this context. The duplicate definition has been
ignored.
Checking our web.xml, we were most certainly defining the listeners in question only once, so what's going on?
After researching the problem, and initially assuming it was a bug (discussed under 6.0.16 here: http://www.mail-archive.com/dev@tomcat.apache.org/msg23391.html), it turns out that the warning is being generated because listeners may be defined in *both* the web.xml as well as within *.tld files. As it turns out, within our specific app, we include jsf-impl.jar (which defines com.sun.faces.config.ConfigureListener in jsf_core.tld) as well as icefaces.jar (which defines com.icesoft.faces.util.event.servlet.ContextEventRepeater in include.tld).
So even though the listeners in question are only defined in the web.xml once, because they are defined in the tld files, Tomcat issues the warning.