This document describes Tomcat server instance auto-registration support in NetBeans. The most important client of this feature is the NetBeans installer.
Tomcat instance auto-registration support is similar to the one that the JBoss and GlassFish plug-ins provide, it is, however, slightly enhanced in order to support also unregistration of a previously auto-registered server.
The auto-registration support may be used to register any of the following versions of Apache Tomcat 5.0.x, 5.5.x or 6.0.x.
In order to auto-register a Tomcat instance the server installation directory, also known as the Catalina Home directory, has to be passed via the org.netbeans.modules.tomcat.autoregister.catalinaHome system property along with a unique token* passed via the org.netbeans.modules.tomcat.autoregister.token system property to the NetBeans process.
$NETBEANS_ROOT/bin/netbeans -J-Dorg.netbeans.modules.tomcat.autoregister.catalinaHome=/opt/apache-tomcat-6.0.10 -J-Dorg.netbeans.modules.tomcat.autoregister.token=1173879696993
* The token is used to identify the server instance when it was unregistered, see below. In the example above the token was generated by java.lang.System.currentTimeMillis().
When the IDE starts up and the two system properties are set, the plug-in recognizes the Tomcat server version and generates the Catalina Base folder location as $NETBEANS_USER_DIRECTORY/apache-tomcat-{$TOMCAT.VERSION}_base. If no server instance with the same Catalina Home and Catalina Base folders has been registered before, it is registered now and the following parameters are set by default.
* If the display name is already used by some other server instance a unique one is generated by suffixing (1), (2), etc.
There are two ways how a previously auto-registered Tomcat can be unregistered from the IDE.