The listener “com.sun.faces.config.ConfigureListener” is already configured for this context. The duplicate definition has been ignored

牧云@^-^@ 提交于 2019-12-08 21:06:48

问题


i am getting the following info when running my application:

The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.

and i want to know what is the cause for such error ?


回答1:


First of all, this is a warning, not an error. The difference is pretty huge. The web application can just continue to run. Warnings are merely to inform the developer about circumstances which are different from expected/natural behaviours which does not necessarily break the functionality. This is very useful for the case that the developer was not aware about the configuration and/or its consequences.

That listener is usually auto-registered by JSF TLD file and the ServletContainerInitializer. You can get this warning message if you have actually explicitly registered the very same listener in your webapp's web.xml.

This warning does not harm. It is basically telling you that you don't need to explicitly register the listener in your webapp's web.xml for the particular target servlet container. You could safely remove the <listener> entry in question from the webapp's web.xml.

However, explicit registration is mandatory in some circumstances such as when the webapp is intented to be deployed to a buggy servlet container which does not properly load the listener from the TLD and/or does not support the ServletContainerInitializer.

See also:

  • could not find Factory: javax.faces.context.FacesContextFactory


来源:https://stackoverflow.com/questions/8716352/the-listener-com-sun-faces-config-configurelistener-is-already-configured-for

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!