How to limit access to a path in Tomcat?

A

Aquila Deus

Laura said:
Hi:

Currently a tomcat installation I have shows content that I do not wish
to have available to external users.

i.e. www.a.com/WEB-INF/ROOT/classes/files

Is there a way I can prevent users seeing the above?

Read about <security-constraint> in web.xml

BTW I'm wondering why there isn't an official servlet like
FileNotAvailableServlet so that I can map forbidden path to it?
 
S

Symon

If you use Tomcat with Apache as webserver. You can add that to your
httpd.cond file :

<Location "/WEB-INF/ROOT/classes/files">
AllowOverride None
deny from all
</Location>

Symon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top