I am trying to show list of Managers based on Department selected from a dropdown. I have written the below code. But Department list is duplicated many time(as many as number of managers for that department) and not showing the values in textarea based on department selected. how to achieve this?
Its wrong to have everything in jsp. You separate the for connection and getting the result from the db but as far as your problem is concern check the results of the query first.
Thanks for your response. I am aware that not to put the JAVA code in JSP. I put it to explain my issue better. As for Query is concerned, it shows list of Manager Names in one column and Departments in other column.
Real code consist of values from different files. If you can provide a demo of two drop downs and first having Department list and second Managers list. The second should display the Managers from that department. This will be helpful.
Thanks Bear Bibeault. I did research about this issue in google earlier. However, your suggestion of using the proper keywords in Google search helped me in finding the solution. I appreciate your help.