new to java
I have a registration form where we can enter the information about a new user(i.e., First Name, Last Name, UserID, Email, etc...). If the user enter a userID which is already exist I want to come back to the same form with an error message(e.g, userID is already exist) with all the data in other fields.
Now I can successfully create the Error Message when the userID is already exist. I have basically set an sessionAttribute and get that Attribute in the JSP and populate that error message in that JSP. But I could not get back the data which is entered by the user before.
When I enter all the information with the userID which is already exists and hit the SAVE button it come back to the same page with the Error Message but all the fields became empty.
I am wondering if anybody can help me how to get back the data as well with the Error Message.
Thanks!!