My application does runtime loading of plugins based on a xml file much like Tomcat does. It also runs an embedded Tomcat server. I would like one of my plugins to be a ServletPlugin. ServletPlugin extends HttpServlet and implements my personal Plugin interface. Much like Tomcat, it loads the plugin object at run time, firing it's default constructor as well as a handful of functions on the Plugin interface. I then want to hand the ServletPlugin to my embedded Tomcat with a simple servlet mapping to have it respond to request coming in from that venue.
I tried digging through what happens when it reads the web.xml file and was quickly overwhelmed with the whole rule-based approach. I imagine it's awesome for what it does, just a nightmare for me to follow. Any suggestions? A book to buy? a phrase to google? Thanks!