Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-16-2006, 06:04 PM   #1
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Rep: Reputation: 15
Limit login attempt using JSP or JAVASCRIPT

I would like to limit users to only have 3 tries to login to my website. If the username/password is not authenticated after the third try, i want to tell them that they cant login again till tomorrow.

can this be done in javascript? or jsp? could you please send me link on where to go? there's no returns when i search for this in google. is session the one or maybe cookies?

thanks i'll appreciate it.
Old 01-17-2006, 12:24 PM   #2
LQ Newbie
Registered: Apr 2004
Location: East Midlands
Distribution: Debian SID; Mandrake
Posts: 17

Rep: Reputation: 0
You can't do it in JavaScript because JavaScript runs on the client side; the best you could do would be to set a cookie that would expire after awhile, and bar users from logging in as long as the cookie was set. Which would be all of a minute, tops, if they're using Firefox. You really want to do something like that on the server end.

But why do you want to limit login attempts to three per day anyway? If you treat people like criminals, they will act like criminals. You might think it's a clever programming feat; but it just might annoy somebody enough to launch a DoS against you. Big locks and alarm boxes are the best way to advertise your valuables.

Just use a normal .htaccess file. That's what it's for. It's in the Apache documentation. Anything else is likely to be at least a little bit less secure.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit the file upload size in JavaScript tooparam Programming 3 01-16-2006 10:02 AM
wrong login attempt limits jester_69 Linux - General 1 10-13-2003 02:57 PM
javascript or jsp question doublefailure Programming 1 11-13-2002 01:03 PM
boot disk required after login -- newbie, first intall attempt kgjac Linux - Software 1 10-10-2001 02:59 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration