| Author |
Getting data stored in an Oracle database into HTML SELECT Control
|
Shailesh Pillai
Ranch Hand
Joined: Jan 24, 2006
Posts: 78
|
|
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.......
|
 |
David Menfields
Greenhorn
Joined: Jun 28, 2005
Posts: 7
|
|
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. Thanks and Regards David Menfields
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26201
|
|
Shailesh, Welcome to JavaRanch! The first step is to write a SQL query to get the data from the Oracle database. Then you can use JDBC to retrieve the data.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: Getting data stored in an Oracle database into HTML SELECT Control
|
|
|