Hi All, I have a jsp page that has series of checkboxes for course and questions.
I have a servlet that takes the checked values from the jsp and gets the required answer for that particular course checked(from the database).This is done using System.out.println()'s, it is done on the console.I have used a for loop pertaining to each course, there is a select query that would select the answers to the questions checked, loops around for each course that is checked, hope what has been done is clearly explained.
I would like to do the same on the browser using a .jsp page, i.e., the servlet calls the .jsp page.For each course that is checked the answers are to be displayed .Help as to how I can proceed doing this would be greatly appreciated.
What I would do is have your servlet instantiate a Map such as HashMap. I would then populate the HashMap with the question number as the key, and the answer as the value. I would then give the request object access to this HashMap with the following statement:
once this is done, you can have the jsp reference the hashmap and display the contents, either with
or with a scriptlet such as:
[ March 09, 2005: Message edited by: Merrill Higginson ]