Following is the code which i have written
There are in all 10 values with their respective values so how can i do that. Please help me. How can i retain the selected value even after the form is refreshed.
No i want to retain value that will be selected by user.
Right now i m able to retain the "Select Designation" value as i have set it.
But i need to retain value that will be selected by the user from the list i.e HOD, Assistant Professor etc
You have to put the selected value in the HttpSession.
And while rendering the screen again , within that JSP add the SELECTED attribute to it based on the match between session value and the one of the values in the dropdown.
Joined: Jan 26, 2010
Ya was able to do it.
What i have done is stored all the values in an 2D array and called those value in for loop and in if condition i checked whether that value is selected.