Hello, first of all sorry for my English is not my native language. I have a web form input field and a servlet (Clustered Weblogic AS) which receives the contents of this input. I would like to limit the attempts given the same value without using rdbms or plain text file, eg
// Getting value of form
String input = request.getParameter ("input");
// Attempts object saves the previously set values
if (attempts.check (input)> 3) (
throw new Exception ();
Else ()
attempts.setValue (input);
)
And I do not decide which is the most efficient way of doing it without using db or plain file.
- Java Cache System
- Static Variable
Another way?