I am refactoring my JSP module. I have a field with the OPTION values hard-coded, and now I have a class that gets the keys/values from a table, so I can keep the screen and report in sync. How do I send the options list to the JSP? I'm not using Struts or anything fancy (except WSAD).
Your question is very vague with regards to what aspect of this has you blocked.
The way I generally do this:
1) The servlet controller for page cooperates with a model class to obtain the key/value pairs. 2) This info gets placed into a request-scoped variable for passing to the page. 3) On-page, JSTL/EL is used to construct the <select> and <option> elements.
Because order is important, the data structure I use is usually a List of Map.Entry elements.