This is a Java servlet filter (as per Servlet API 2.3). This filter lets you add automatic filtering of traffic to your web-site. TrafiicFilter lets you prohibit access to your site for clients with excessive hits. More detailed: as soon as some IP address during the given time interval produces more than the given amount of hits than access for this IP address will be closed for some time. This time interval as well as allowed hits per interval and ban time all are parameters for TrafficFilter.
How to use it:
a) download trafficflt.jar and save it in WEB-INF/lib
b) describe this filter in web.xml. Parameters are:
interval describes a test interval in seconds. Default value is 10.
c) describe a mapping for this filter in web.xml
in this case filter will be on for the each .jsp file. In this example filter allows no more than 15 requests per 10 seconds and closes access to site for 600 seconds.
You can use Traffic taglib for getting info about the banned hosts in your JSP page.
Traffic filter: trafficflt.jar
See also JSOS - the largest collection of servlets and filters.
Also in JSOS: