Hi all. I am doing an application using struts. In my jsp page i have 2 drop down list. The value for the first drop down list is obtained by running a query and i am able to display the values in the first drop down list.
The value for the second drop down list depends on the value of the first. So after selecting the first drop down list i again go to my action class and run the query for getting the second drop down list value by passing the selecting value of the first drop down list.
Everything is fine.Except when i select the first drop down list value and come back again to my same jsp page after running the query for second drop down list the value i have selected for the fist drop down list is changed .My problem is how do i maintain the value of the first drop down after returning to the same jsp .
Any hint or clue or any form of help is really appreciated. Please let me know if i am not clear with my question.
Thanks for the reply. I am using JSTL tags.I am putting a part of code below.
When onchange happens it goes to my action class. In my action class i am able to get the value . Using that only i am running my second query to get the value for second drop down list.I am able to get the value for my second drop down list also.Problem is that when i come back to the jsp the value is initally selected is not appearing in my first drop down list. It is showing some other value. Any hint or clue will be really useful.