This will only be not null after the first servlet handler has run.
If your handler is executing outside the scope of the servlet deployment then you need to
store a reference to the ServletContext somewhere (worst case = stick it in a static
somewhere).
Stuart
Lightspoke Discussion wrote:
If you are running before the initial handler you need to store a
reference to the servlet context or the Deployment somewhere.