cancel
Showing results for 
Search instead for 
Did you mean: 

AJAX In EP

Former Member
0 Kudos

Hi,

Recently I have developed an AJAX implementation project in EP,where I am creating a .txt file in the server thru java code, which stores the name as entered by the user(in registration.jsp).Now the registration.jsp has a "check" button which checks if the new entry made by the user is there in the file or not. Here comes the role of AJAX, which asynchronously calls a Servlet along with the input param.If it already exists then it shows the message that user is not available to regiser again as it is currently stored in the file.

Now, this backend file is everytime overwritten; ie; its current content is erased, and the entry made by the user is saved using java code.

The problem I face here is:

Suppose I am running this application in continuity for say, 10 times. Then if I provide a new value which has not been used before, it runs fine, but the moment I provide a name which has been used before in testing (now erased, and no longer exists in the file), then it pops up a value which was stored(in the java file) at that time when this value was compared.

It seems as if there is a value pool, which is referenced every time when the form entry is checked against the file entry.

If first verifies:"Has it been compared before?" If yes, then what was the file content read? And returns the value .

Otherwise a new input, the file is read again, and the comparison is done afresh.

Is my understanding correct?That is what my question is?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Closed.