Why ServletContext.getAttribute(Bayeux.ATTRIBUTE) returns null ?
Submitted by sbordet on Mon, 01/11/2010 - 17:10.
The command
ServletContext.getAttribute(Bayeux.ATTRIBUTE)
returns null when it is run before the CometD servlet has had the chance to put the Bayeux object into the servlet (application) context.
This page explains how to use the load-on-startup element in web.xml to specify the order of initialization of the CometD servlet and of your code.
»
- Printer-friendly version
- Login to post comments