Reading the docs:  http://tomcat.apache.org/tomcat-7.0-doc/config/context.html 

"..The web application used to process each HTTP request is selected by 
Catalina based on matching the longest possible prefix of the Request URI 
against the context path of each defined Context."

If I have a webapp, with a www directory, and in that www directory are other 
directories, how would I restrict access to one of those subdirectories to the 
localhost?

webapps
 webapp1
  -WEB-INF
    -classes
    -lib
  -www
    -directory1
    -directory2

Is the context path of directory1:  /webapp1/directory1

Would I create a context named directory1.xml such as the following?

<?xml version="1.0" encoding="UTF-8"?>
<Context antiResourceLocking="false" privileged="true" 
path="/webapp1/directory1">

  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
</Context>


Leo 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to