JSP - Count Text Box User Attempt - Session Terminate

Hi,

I have a form which has a Text box in which I require user to input some numeric value and press SUBMIT button.

I want to keep a check that if user Submits 5 incorrect values in the Text box, it should terminate that page or redirect him to some other page and he should not be allowed to enter new value for some specified time (say 15 minutes)........or can i restrict him to access that page for that stipulated time ?

How to achieve that ? Please help

[484 byte] By [linkinpark2007a] at [2007-11-27 10:51:12]
# 1

store a session attribute called "invalidAttemps" or something and once it gets to 5, set another variable on his seesion to prevent him from accessing that page.

den2681a at 2007-7-29 11:29:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

session scope probably wouldn't be good enough.

The user could just close their browser, open a new session and keep trying.

You would need some way to identify the user.

IPAddress?

Have they identified themselves in some other way?

Also you need to persist this information. Either in application scope, or maybe even a database.

evnafetsa at 2007-7-29 11:29:46 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...