I am having a column named 'AREA' in a table named Editors. I am now making a html page for Staffs. In that page, i am having a field named 'AREA OF WORKING'. I have to retrieve values from AREA column of EDITORS table, and have to give the same areas to staffs in a list. So, that the staff can choose his area. So, i can't hardcode the values in HTML page.

So, how to proceed with the above mentioned problem?

Do you know how to run queries using java? Search this forum for examples. Then have in a separate class a method that will run your query and return the data from the DB. Then call that method from the jsp.
Once you have tested your method, you can use a select box for the drop down list.

First do the method for the database and post some code. Then we will see how you can make that dynamic list

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.