i have created the js file for this purpose but i cannot find a way to limit the access after 3 failed attempts based on user's ip address. can someone please suggest me a way to do that? i do not have spring on my application, just simple java servlets and jsps.

1 Answer 1


You can configure fail2ban to watch your webserver logs. Just be sure to log something when a login fails to your web app.

Note - if the person who fails is behind NAT, you'll be blocking all people coming from behind that address. In theory, this lets one person's actions block an entire college, corporation, etc.

Not the answer you're looking for? Browse other questions tagged or ask your own question.