How To Protect Directories with Apache Tomcat Realms Print

  • 291

How To Protect Directories with Apache Tomcat Realm

This document explains how to protect directories in Tomcat similar to .htaccess with Apache.

Since Tomcat does not use Apache to render its pages it does not use Apache httpd, therefore you won't be able to use .htaccess or the features in your control panel. Instead, you can use Apache Tomcat realm will do this for you and its built into your fast Java web hosting container. Realm is more complicated and requires tinkering with the server.xml file. There are some examples of Realm in the server.xml however here is a blog article with Tomcat Realm examples.


Was this answer helpful?

« Back