https://issues.apache.org/bugzilla/show_bug.cgi?id=49181

Pid <bugzi...@pidster.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #4 from Pid <bugzi...@pidster.com> 2010-04-26 07:24:58 EDT ---
(In reply to comment #3)
> Thanks for the patch. I applied the second one to 7.0.x and it will be 
> included
> in 7.0.x onwards.

This was bugging me.  I've spotted a possible error in the patch.

Srv3.0 4.4.3 says "If the ServletContext was passed to the
ServletContainerInitializer’s onStartup method, then the given listener MAY
also implement javax.servlet.ServletContextListener in addition to..." in each
subclause, implying that a class that only implements ServletContextListener
should not be dynamically added.

Seems crazy, but it is easy enough to fix, patch attached.

I'm now reading these clauses to also mean that anything else with access to
the ServletContext shouldn't be able to dynamically add classes, (e.g. in a
Servlet.config(config), or another ServletContextListener), which could be a
resolved by wrapping the supplied ServletContext in an object which just throws
UnsupportedOperationException's for each of the relevant methods, and delegates
the rest.

I aim to supply a patch for this shortly.

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to