File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes I need a traffic restriction solution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "I need a traffic restriction solution" Watch "I need a traffic restriction solution" New topic

I need a traffic restriction solution

Kamila Rutkowski
Ranch Hand

Joined: Sep 22, 2009
Posts: 37
I'm searching for a solution to display automatically a captcha when more than one request received from same address per hour. Could any one please help me?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

That can be sticky. A lot of places have thousands of users who all appear to the webserver as being at the same IP address. Even my own site has half a dozen, and it's just a SOHO setup.

You could use cookies, but of course, anyone attempting to assault you would also probably be impolite enough to strip out the cookies.

There are a number of JSF captcha tags available right now, so displaying and filtering via captcha is easy. If you truly want to grab IP addresses, you could build a hashtable in the backing bean, add IPs as they come in, and set the "rendered" attribute on the captcha according to whether the entry is new or a repeat.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: I need a traffic restriction solution
It's not a secret anymore!