You database fetch should be preformed in a mode-layer class that copies the data into a List of beans or other construct, and immediately closes the resultset. The servlet controller for the page calls this call and passes the list to the JSP as a scoped variable. The JSP uses <c:forEach> to iterate over the list and create the corresponding HTML output.
Thank you for the reply. As I mentioned, it is an example code and not full code. If you help me with above code, then I can do the remaining code. I am using HTML to display the text values in textbox and not JSP tags. In this case, How I will I be able to Iterate?
I never used JSTL or AJAX. I googled and tried using <C:out> to print the value. But It looks like I am making many mistakes with syntax and logic. Is it possible to give a small example using JSTL so that I can print the value. Thank u. Also Tried below code that didn't work.