| Author |
how to populate drop down list using servlet and jsp
|
swaminathan kethar
Greenhorn
Joined: Mar 28, 2012
Posts: 1
|
|
|
I have one database. I need to populate dropdown list dynamically. that is, i need to populate empid in jsp from the database.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56229
|
|
In the servlet page controller for the JSP, delegate to the Model to fetch the information for the drop down. Place the information into request scope as a List or Map. In the JSP, use the JSTL and EL to create the drop down options.
Your turn.
Write some code and let us know where you have difficulties.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
One more thing: figure out what the HTML for this drop-down list should look like. It might help to write it down on a piece of paper, or something like that. Then make sure you write your JSP so that it generates that HTML.
|
 |
 |
|
|
subject: how to populate drop down list using servlet and jsp
|
|
|