Re: Restrict access to a webapps folder based on ip

2003-09-09 Thread Marco Tedone
lt;[EMAIL PROTECTED]> Sent: Tuesday, September 09, 2003 3:29 PM Subject: Restrict access to a webapps folder based on ip > I was wondering if it was possible to restrict access to a certain > webapps folder based on the ip the packet was coming from. > > So if .../webapps/app1 was

Re: Restrict access to a webapps folder based on ip

2003-09-09 Thread Christopher Williams
Joshua, Try something like the following: import java.net.InetAddress; import java.io.PrintWriter; String remoteHost = request.getRemoteHost(); InetAddress clientAddr = InetAddress.getByName(remoteHost); String dQuad = clientAddr.getHostAddress(); // Do something with the dotted quad address e.g

Re: Restrict access to a webapps folder based on ip

2003-09-09 Thread Jon Wingfield
Tomcat specific: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/valve.html Portable: Write a Filter which accepts/rejects based on the request ip. This could be configured statically through init parameters within web.xml or by JMX (or other means) on the fly ;) caveat: ip addresses can

Restrict access to a webapps folder based on ip

2003-09-09 Thread Joshua Russell
I was wondering if it was possible to restrict access to a certain webapps folder based on the ip the packet was coming from. So if .../webapps/app1 was for an intranet site with all ip's within a certian range having access, and /webapps/app2 for a web-site allowing machines with any ip. Doe