Oracle GlassFish Server 3.0.1 Application Development Guide

Creating the Deployment Descriptor

This section describes how to create a deployment descriptor to specify how your Comet-enabled web application should be deployed.

ProcedureTo Create the Deployment Descriptor

  1. Create a file called web.xml and put the following contents in it:

    <?xml version="1.0" encoding="UTF-8"?>
    	<web-app version="3.0"
    			" ">

    This deployment descriptor contains a servlet declaration and mapping for HiddenCometServlet. The load-on-startup attribute must be set to 0 so that the Comet-enabled servlet will not load until the client makes a request to it.