Hi every one, I want to control access to my application running on tomcat by Host names, I tried the class "org.apache.catalina.valves.RemoteHostValve" in the following manner
<Context path="/MyApp"> <Valve className="org.apache.catalina.valves.RemoteHostValve" allow="RD[-]CDMA1\.ETCS\.LOCAL,RD[-]MLotfy\.ETCS\.LOCAL,(?i)LOCALHOST"/> </Context> I know that it takes a regular expression in the allow values, so I use (\.) to represent the dot(.) and [-] to represent the hyphen - . It also works good at my local host and using my machine's host name, so it can resolve the host name of my machine, but it seems that it can't resolve host names of other machines, I don't know why. When I use the "RemoteAddrValve" class, it works good because it can recognize the IP address of the machines, but i don't know why it can't resolve Host names. plz, if any one know the problem and solution, tell me. thanx in advance, Mohamed Lotfy.