On Wed, 17 Jul 2013, Mark Thomas wrote:

No problem. The expectation of the EG (this was before I was an EG
member but I've chatted about this with Filip who was on the EG for
Servlet 3.0) was that the adding was only for use during context start.
There was some debate about adding during run-time but the conclusion
was not to support that - I think due to potential complexity vs.
benefit / minimal demand.


I can certainly understand that. I'm speculating that using addServlet() from init() worked because of the Tomcat's support for lazy servlet init. There's no analogous notion for filters so they never had a chance.

If you have a use case, feel free to open a Jira for the Servlet EG to
consider for 3.2. Contact details should be in the 3.1 spec.


My use case is pretty simple. I have a ``parent'' servlet that instantiates a number of ``child'' servlets (there's no real hierarchy here, once they're started they're all peers) based on the parent's <init-param> values (e.g. query a database, read configs from a dir, etc). And, I have multiple parents defined per web.xml file.

I have a reasonable work-around so it's not a big deal. It would just be a little cleaner if I could do it the way I originally planned.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to