This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes How to bind database items in my combox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "How to bind database items in my combox" Watch "How to bind database items in my combox" New topic
Author

How to bind database items in my combox

paul alvin
Greenhorn

Joined: Nov 15, 2012
Posts: 15
How can I get the database items to be the options in my combo box items?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61310
    
  66

In the page controller, fetch the list of options from the model. Pass them to the JSP as a scoped variable that is read by JSTL and EL on the JSP to create the option elements.

P.S. Please read HtmlHasNoComboBox -- proper terminology can be important.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: How to bind database items in my combox