About Editing the Tomcat Configuration File

See Also

The main configuration file for Tomcat is the server.xml file. It provides configuration information for Tomcat components and specifies deployment information for the server. For simple web applications, editing the server.xml file is not necessary because the IDE makes the necessary changes automatically. Most edits to the server configuration file can be achieved by editing the properties for the Tomcat Web Server node, or by using menu commands in the Projects window, Files window, and Services window.

Editing is usually necessary only for advanced configuration, such as setting up authentication based on JNDI or database lookups. For more information about configuring Tomcat, see:

The server.xml file can be in one of two places. Typically, you edit the server.xml file that is in the tomcat-installation-dir/conf directory. However, if the server node's property sheet shows a base directory path that is different from the home directory path, then you must edit the server.xml file that is in the base-dir/conf directory.

You can edit the server.xml file that is in the base-dir/conf directory in the Source Editor. It is recommended that only advanced users edit the server.xml file in the Source Editor.

To edit the server.xml file in the Source Editor:

warning Be aware that you manually the server.xml file at your own risk; the IDE cannot repair a damaged server.xml file. You are strongly encouraged to create a backup version of your working server.xml file before beginning to edit by hand.
  1. In the Services window, expand the Servers node and the Tomcat Servers node.
  2. Stop the server by right-clicking the Tomcat instance node and choosing Stop.
  3. Right-click the Tomcat instance node and choose Edit server.xml from the contextual menu to open the server.xml file in the Source Editor.
See Also
About the Tomcat Web Server
Viewing the Tomcat Web Server in the IDE
Customizing the Tomcat Web Server

Legal Notices