You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Martyn Hiemstra <ma...@hi-ss.nl> on 2006/05/09 12:36:17 UTC
Adding servlets during startup
Hi All
I am currently using Struts 1.2.9 in combination with tomcat 5.0.28. I
want to constructed my website so that its possible to import modules.
Each module is a seperate package, meaning servlets are placed over
multiple packages. The problem with this is that the web.xml cant
contain servlet mappings because it doesnt know which modules are
installed. To solve this I want to create one servlet that dynamically
adds the servlets and their mappings during the startup of Tomcat.
I found a function addServletMapping in The servletContext class but the
problem is there is no function to add a servlet. If I understand
correctly you first need to install a servlet and then its mapping.
In short I need to move the servlet + servlet-mapping section from the
web.xml into a single servlet that at startup adds the servlets to the
list of known servlets.
Thanks in advance,
Martyn Hiemstra
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org