Getting data stored in an Oracle database into HTML SELECT Control
Joined: Jan 24, 2006
I would like to get the data stored in my database (Oracle) to be displayed in the HTML Form - Select Control (Combo Box) when the form is loaded.
In short, when the HTML Form is displayed the Select Control in the form should have the data that is in the database. I m using JSP. How can I do this?
Please help me out.......
Joined: Jun 28, 2005
Assume xyz.jsp has a select control as a HTML form component. Write a separate business component(class file)through which retrieve the values from database. In jsp file , inbetween the jsp tags(<% %> , access the class method which returns the values and populate it in select control. So, when you access the jsp page in browser , inturn it invokes the method which returns the values in the form of vector/arraylist. They will be formated and loaded in Select Control.