This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Getting data stored in an Oracle database into HTML SELECT Control Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Getting data stored in an Oracle database into HTML SELECT Control" Watch "Getting data stored in an Oracle database into HTML SELECT Control" New topic
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: 30130
    
150

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting data stored in an Oracle database into HTML SELECT Control
 
Similar Threads
Who can figure this one out?
.js file and dynamic array
Passing a Form Bean to a Custom Control
formatting the textarea form field in a servlet
formatting the textarea form field in a servlet