Sun GlassFish Enterprise Server 2.1 Developer's Guide

Enabling Comet Support

To enable Comet support for an HTTP listener and all its associated web applications, set the cometSupport property to true. For more information, see http-listener in Sun GlassFish Enterprise Server 2.1 Administration Reference.

If your servlet or JSP page uses Comet technology, make sure it is initialized when the Enterprise Server starts up by adding the load-on-startup element to your web.xml file. For example:

<servlet>
   <servlet-name>CheckIn</servlet-name>
   <servlet-class>CheckInServlet</servlet-class>
   <load-on-startup>0</load-on-startup>
</servlet>