I have PostJob.jsp which calls InsertJob.jsp. In PostJob.jsp user enters his RegistationId and other job information.
In database I created a table that has RegistrationId and JobNo as a primary key.
As soon as InsertJob.jsp is called it gets the parameter of RegistrationId and looks for the max(JobNo) in the table. After getting max(JobNo) it increments JobNo by 1 and inserts the job details.
if regId = 21 and max(JobNo) is 3 . JobNo is incremented by 1 and stored as JobNo = 4.
The problem here is, when http://localhost:8080/InsertJob.jsp
is refreshed the same job details is once again inserted in the table by incrementing JobNo by 1.
How can I handle this? . Please give me suggestions.