Question : Can I use apache .htaccess files with tomcat?

I have an .htaccess file in a folder managed by tomcat. I want to restrict access to this particular folder except by authorized people. However, it appears that .htaccess does not work with tomcat. Or does it? How can I accomplish what I want?

Answer : Can I use apache .htaccess files with tomcat?

So you're using Apache httpd already as a frontend which connects to the backend (tomcat)?

> Could you elaborate on your mod_auth idea?

You'll need a   section (httpd.conf of course) to define the relam.
1:
2:
3:
4:
5:
6:
7:
8:

    AuthType Basic
    AuthName "Restricted"
    AuthUserFile /path/to/.htpasswd
    Require valid-user
    # apache 2.2.x
    AuthBasicProvider file

Random Solutions  
 
programming4us programming4us