I am writing a html page that contains a dropdown 'select option' list of countries. The HTML page is displayed via a servlet.
Does anyone have any idea how this is done? I have looked for tutorials but none fit my problem.
Basically, my servlet is loaded, goes off to a database and returns a list of country names, then displays a pre-written HTML page. I want to add this list to the HTML page. I don't want the database code to reside in the HTML page.
I have a .src file that I have created. In my servlet, I created a string variable containing a Select list. I set this string into a hashtable and did a PrintWriter.println() with the hashtable inside. I then read this variable in the .src file and it displays the Select statement.