https://issues.apache.org/bugzilla/show_bug.cgi?id=49952
Summary: ServletContainerInitializer can't actually add
listeners
Product: Tomcat 7
Version: trunk
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=26044)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26044)
Keep the listeners added by ServletContainerInitializer
Any listeners added by a ServletContainerInitializer will be wiped out when the
listeners from web.xml are sorted and overwrite the arrays that already have
the SCI-added listeners in them.
I've taken the approach of keeping the single list of listeners from web.xml
and keeping the sort into types in listenerStart. I think it might also be
possible and more elegant to have the addApplicationListener method be the same
code as the ServletContext.addListener(String listenerClassName) method.
Patch includes a test demonstrating the problem. The patch to ServletContext
may need line number adjustment unless you have applied my patch for supplying
the jsp file as a jsp servlet init param.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]