IntelliJ Java IDE
The moose likes JSP and the fly likes populate the combo box when the jsp page is first loaded Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "populate the combo box when the jsp page is first loaded" Watch "populate the combo box when the jsp page is first loaded" New topic
Author

populate the combo box when the jsp page is first loaded

X Luo
Greenhorn

Joined: Aug 19, 2002
Posts: 5
I got a combo box in the jsp page, the data of which is from database, how can I do to make sure that the combo box is populated once the jsp page is loaded. What method I use for the form?
Thanks.
Vadiraj Deshpande
Ranch Hand

Joined: Aug 16, 2000
Posts: 78
I feel there are 3 ways of doing it.
1. Have a Javabean filled with data and use the <jsp:useBean> tag to fill the values.
2. Use a JSP custom tag which outputs the HTML of SELECT control(combo box) with data filled in.
3. Use scriptlets to fill data.
Surely as many agree I would go for option 1 or 2.
Hope this helps,
Have fun,,
Vadiraj.
X Luo
Greenhorn

Joined: Aug 19, 2002
Posts: 5
Thanks, Vadiraj.
Sorry for coming back to you so late. Have been very busy jsp-ing and forgot to check this out. Yes, I did sort the combo out finally.
Thanks again.
 
 
subject: populate the combo box when the jsp page is first loaded
 
Threads others viewed
How to load data in a combo based on user selection on another combo
combo boxes and iterator
populate the select when page is displayed first time
Regarding combo-box
Combo Box
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture