Sun GlassFish Enterprise Server v3 Prelude Developer's 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.

ProcedureCreating 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="2.5"
    			" ">

    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.