Hello guys, I have been creating a webpage with jsp and html.

I reached to a process where I need to connect database in order to bring table list, column list and data recorded in each column.

In order to do that, I separate the scenario in DBconnect.html and process.jsp; here's what I'm thinking.


1. use textbox to get user id, pw and server ip address.
2. use button named 'connect' to send above information to process.jsp
3. create three select boxes in order to receive names of instances, tables, columns respectively.


1. Use received information from DBconnect.html to connect database.
2. Create statements to bring certain data and Execute them in order to receive outcomes from Database.
3. Once data is received, use while loop to show data one by one, and send them to appropriate option values.

So I create these complementary pages and I couldn't figure out how to code while loop and select box properly in order to bring data from process.jsp to option values in DBconnect.html

Here's my while loop statement in process.jsp and I have no clue how to export this values into option values.

while(rs.next()) {
String instance = rs.getString("INSTANCE");
Also, since it is my first time coding the webpage, I am still not sure if creating two complementary pages is the best solution.

Please, help me out and tell me if there's any better solutions to create such a page.

Thank you