File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Reading from database and putting into Combo Box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Reading from database and putting into Combo Box" Watch "Reading from database and putting into Combo Box" New topic
Author

Reading from database and putting into Combo Box

Ben Reeves
Greenhorn

Joined: Jan 23, 2006
Posts: 5
Hey,
Sorry for disturbing you but im having problems trying to get data from a mysql database and displaying it in a combo box on a jsp page. I had a look at some sample code you gave on the forums, but im still not sure. Im doing an airline booking system. I want to get the list of origins from my database and put it in a combobox on my jsp. then i have a combo-box which should have a list of destinations which changes depending on the origin selected from the drop down list. Im really stuck with this, could you please help me???

Thanks,
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Where is the problem?

- In retrieving the data from DB
- In filling the combo box with that data
- filtering the other combo based on origin combo
Ben Reeves
Greenhorn

Joined: Jan 23, 2006
Posts: 5
At the moment its filling the combo box with data. I know how to retrieve data from a table. Would i need to put all the code on the jsp or can i put it in the java class?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Most definitely not in the JSP.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Similar previous topics:

http://www.coderanch.com/t/288857/JSP/java/Populating-html-select-tag-without

http://www.coderanch.com/t/285869/JSP/java/Map-Dropdown-JSTL-EL
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading from database and putting into Combo Box
 
Similar Threads
Struts combo box
Populate JCombo Box with different Values in each Row in JTable
UseBean
How do I store list of value from database in to combo box
Displaying record from combo box