Working With Deployment Descriptors (web.xml)

See Also

A deployment descriptor identifies the elements belonging to a web module, such as servlets and JSP files. The deployment descriptor also provides configuration information for that web module's deployment. The deployment descriptor takes the form of a plain text file, called web.xml, that is written in the XML (Extensible Markup Language) syntax. The IDE supports both version 2.3 and version 2.4 of the Servlet specifications.

To edit the web.xml file of an existing web module:

  1. In the Filesystems window, locate the web module directory and expand its WEB-INF subdirectory.
  2. Double-click the web.xml node to open the file in the Source Editor window.
  3. Enter the web.xml elements. You can use the code completion feature to ensure that the elements are syntactically correct.
  4. (Optional) Right-click in the Source Editor and choose Validate from the contextual menu to verify that the document follows the XML schema for web deployment descriptors.

Troubleshooting

If the port number of the server changes, the changes to the deployment descriptor do not take effect until you restart the web module.

See Also
  About Web Modules
Where to Put Web Module Files
Upgrading to JSP 2.0 and Servlet 2.4 Specifications
Web Module Deployment Descriptor (web.xml) Node
web.xml Property Sheet

Legal Notices