tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: adding servlet definition to context on the fly :Tomcat 5.5
Date Sun, 05 Oct 2008 08:55:49 GMT
ram.sriharsha@agileitinc.com wrote:
> Hi,
> I had written some code to dynamically add a servlet to a context in a
> deployed applicaiton in Tomcat 4.1. This code basically uses the catalina
> loader to obtain the server->engine->host->and context, and invokes the
> addChild method after configuring a StandardWwrapper to represent the
> servlet I am adding. This all works fine in Tomcat4.1 and I am able to
> access the servlet through the right url immediately, without having to
> restart Tomcat.
> However, I tried the same code in Tomcat 5.5 and it does not work. It does
> not throw any errors, but simply does not recognize the url pattern once i
> actually try to invoke the new servlet. I was wondering if anyone had
> tried this before, and if so if they have any suggestions as to why this
> does not work in Tomcat 5.5?

Are you calling addServletMapping() on the context after you have added the
wrapper? It looks like this was unnecessary in 4.1.x but is required in 5.5.x.

If that isn't it, I would suggest attaching you favourite IDE and debugging
your way through the request mapping process to see where it is going
wrong. This certainly should be possible.

As an aside, version 3 of the servlet spec is expected to include this sort
of functionality in the Servlet API.

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message