Authenticating the Tomcat Web Server

See Also

It would not be safe to ship application servers and web servers with default settings that allowed anyone on the Internet to execute them on your server. Therefore, servers are shipped with the requirement that anyone who attempts to use them must authenticate themselves, using a username and password with the appropriate role associated with them.

For example, the Tomcat Web Server uses the Tomcat Manager to run web applications. To authenticate yourself when you run your web application, JSP file, or servlet, you need a username and password for a user with the "manager" role. This username and password are defined in the tomcat-users.xml file that is in your user directory.

tip  You can only use the usernames and passwords that are defined in the IDE user directory's tomcat-users.xml file, and not those that are in the IDE installation directory's tomcat-users.xml file. Click show to display the password for a username created while registering the server with the IDE.

During installation, the IDE generates a user called ide for use with the bundled Tomcat Web Server. This user is assigned the "manager" role and is created in your user directory's tomcat-users.xml file.

To set the username and password for the Tomcat Manager:

  1. In your system, go to Tomcat's base directory and then to its \conf subfolder.
    tip  If you don't know where Tomcat's base directory is, right-click the Tomcat Web Server instance node in the Services window and select Properties. In the Server Manager, the Catalina Base Directory points to the base directory.

    The tomcat-users.xml file in Tomcat's base directory contains instructions for creating user roles. If necessary, define the necessary role, save the file and stop and restart the Tomcat instance in the Services window.

  2. Open the tomcat-users.xml file and make a note of the password that is defined for the ide username.
  3. Right-click the Tomcat Web Server instance node in the Services window and select Properties. In the Server manager, type the username and password.
tip  If the username and password have not been specified, a dialog box appears when you run a web application, JSP file, or servlet. If you specify the username and password in this dialog box, they are not saved. The username and password are only saved if you define them in the Tomcat Web Server instance's Properties dialog box.
See Also
About the Tomcat Web Server
Setting Up a Tomcat Database Connection Pool

Legal Notices