You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/06/01 09:10:20 UTC

DO NOT REPLY [Bug 51278] Unable to override default servlet other than in main web.xml

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

--- Comment #4 from Chris Beams <cb...@gmail.com> 2011-06-01 07:10:20 UTC ---
(In reply to comment #3)
> That would seem to conflict with the exposure of servlet registration events in
> the 3.0 API... a registration event that occurs later isn't supposed to
> conflict with ones occurring earlier (for Servlets, that is... I realize we're
> discussing Filters, here).

Hi Christopher,

Actually, we are talking primarily about Servlets here.  I was only mentioning
the FilterRegistration API momentarily above.

The critical issue is this: Tomcat users can override the DefaultServlet's
mapping to '/' within web.xml, but cannot do so within a
ServletContainerInitializer (or presumably any other programmatic context). 
This inconsistency means that web.xml cannot be completely replaced by code in
a Tomcat environment, which is what we're aiming to facilitate.

I've been unable to pinpoint a passage in the spec that spells out that the
status quo is the way things *should* work, but then again - and if I
understand things correctly - the spec is silent on the way Tomcat registers
its DefaultServlet, so we're probably already in unspecified territory, yes?

Even if the spec did mandate or strongly suggest the status quo, I would go so
far as to argue that the spec should be changed.  The ServletContext API now
allows for full programmatic registration, let's let users take advantage of
it!

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