load servlet mappings at runtime in tomcat  
Author Message
Moth





PostPosted: 2006-9-18 19:13:00 Top

java-programmer, load servlet mappings at runtime in tomcat Can anyone suggest a way to achieve dynamic servlet mappings in tomcat 5.5.

What I want to do is run a web app with any number of paths all pointing to
one servlet. These paths would be loaded from a database and extra paths
can be added at runtime by the user. So an example would be
www.domain.com/sample and www.domain.com/anothersample would both execute
the same servlet.

Another option I thought of was having a custom 404 servlet that would check
the request supplied and then redirect.


 
Thomas Hawtin





PostPosted: 2006-9-18 21:40:00 Top

java-programmer >> load servlet mappings at runtime in tomcat Moth wrote:
> Can anyone suggest a way to achieve dynamic servlet mappings in tomcat 5.5.
>
> What I want to do is run a web app with any number of paths all pointing to
> one servlet. These paths would be loaded from a database and extra paths
> can be added at runtime by the user. So an example would be
> www.domain.com/sample and www.domain.com/anothersample would both execute
> the same servlet.

Install it (or a forwarding servlet) as the default mapping in the root
webapp?

Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/