Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 6.1.7
-
Fix Version/s: None
-
Component/s: HTTP
-
Labels:None
-
Number of attachments :
Description
I am investigating how to add Zeroconf support to jetty, and some investigation with the 6.1.7 source have indicated that the appropriate place to do the necessary registration and deregistration of the zeroconf service is in the doStart() and doStop() methods of WebAppContext, and would fit well in a subclass of WebAppContext with the registration after the super.doStart() and the deregistration before the super.doStop().
Unfortunately the scan() method in WebAppDeployer is hardcoded to create a new WebAppContext object, so there is no easy way to use my subclassed WebAppContext. The only other alternative would be to have a ContextHandlerCollection which can be assigned to a WebAppContext, which I do not think is a good way to do this.
Could the hardcoded new be replaced with a call to a user customizable factory method?
Thorbjørn,
Have you tried using the ContextDeployer? In the context xml file you should be able to specify whatever type of WebAppContext subclass you want:
<Configure class="my.special.WebAppContext">
...
</Configure>
cheers
Jan