David Jencks wrote:
Well, not a lot, since I haven't figured out how servlets are deployed in jetty. What I imagine is parsing web.xml, constructing a gbean for each servlet, and registering it somehow with the webapp gbean or the jetty container. Unfortunately on my last venture into jetty code I didn't see how to do this right off.
David,
the code for deploying servlets has been in a state of flux - but is now pretty much stable in the 5.1.SNAPSHOT being used by geronimo.
The mechanism for configuring a webapplication is now based on a pluggable array of WebApplicationContext.Configuration classes.
For example the standard deployment of Jetty now uses <Set name="WebApplicationConfigurationClassNames">
<Array type="java.lang.String">
<Item>org.mortbay.jetty.servlet.XMLConfiguration</Item>
<Item>org.mortbay.jetty.servlet.JettyWebConfiguration</Item>
<!--
<Item>org.mortbay.jetty.servlet.jsr77.Configuration</Item>
-->
</Array>
</Set>
The XMLConfiguration class parses web.xml and calls the WebApplicationContext API to configure servlets.
JettyWebConfiguration looks for a jetty-web.xml file and executes it.
The jsr77.Configuration iterates over all configured servlets and creates JSR77 stats mbeans for them.
I think geronimo can implement its own set of WebApplicationContext.Configuration. XMLConfiguration can be replaced by something that works directly from a deployment plan.
We probably don't need/want JettyWebConfiguration
If an gbean is needed per servlet, it can be modelled on the jsr77 configuration
cheers
