This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts login page

 
Abebe Belew
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am developing a web application it struts.
In my login page I just want to give 3 chances for users to try to login
using userid and password (meaning unless they provide the correct combination).After three incorrect attempts, I want to record the userid and keep them from logging to the page for the next 24 hours.
how do I do that?

Thanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your question is sort of off topic for this forum.

I am going to move this thread to the more appropriate, Web Applications Framework forum

Thanks and good luck

Mark
 
John Smith
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way that springs to mind is to stick a timestamp field in your user login table, when a user has 3 failed attempts set the timestamp to the current time. When a user attempts to login if that time stamp is in the last 24 hours deny them access, if it isn't them clear it and it's good to go. You may want to have this in a seperate table or add an extra bit to say when the timestamp is valid or something but that's how I'd do it, hope this gives you some ideas
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic