• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading from database and putting into Combo Box

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most definitely not in the JSP.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic