I have a apache tomcat server integrated with mod_jk. I have created .htaccess files in the directories I want to restrict. but the problem is .htaccess is working in apache
.htaccess
are Apache Web Server files, not Tomcat. Tomcat just ignore these files. If you serve your application through mod_jk, then anything that JkMount
maps to is served by Tomcat and no .htaccess will be processed.
If you need to password protect Tomcat directories, you need to create a Realm in Tomcat and protect the web-resource.
An old but I think still accurate example