How To: Disable Directory Listing for the built-in Apache Tomcat Web Server on port 8399 with ArcGIS Server for the Java platform
Instructions provided describe how to disable Directory Listing/Directory Browsing for the built-in Tomcat Web server running on port 8399 with ArcGIS Server for the Java platform.
When ArcGIS Server for the Java platform is installed, the internal Apache Tomcat running on port 8399 will set Directory Listing enabled by default. This can be a very useful debugging tool, but for production deployments, this should be turned off.
Note: Apache Tomcat uses the term Directory Listing instead of Directory Browsing as in Microsoft Internet Information Services (IIS).
Create a blank index.html file and put this index.html file in the docBase C:\Program Files\ArcGIS\java\web_output folder, which prevents the directory from appearing.
(Optional) Instead of using a blank index.html page, any Web page, for example, Server Manager page or even Corporate Intranet Home Page, can be redirected.
For instance, put an index.jsp page under this location, C:\Program Files\ArcGIS\java\web_output, will redirect to the Server Manager page.
Example of content of the index.jsp file can be found below:
Edit the global web.xml file to turn off the option.
The parameter for this Directory Listing is in the web.xml definition of the internal Apache Tomcat, which is what is generating those directory listings. The default web.xml file is in the conf directory.
1. Edit the following file with a text editor such as Notepad.