Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
07-07-2012, 07:33 AM #1
- Join Date
- Jul 2012
- Thanked 0 Times in 0 Posts
How do I use select box to put names of DB tables and so on?
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.
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.