populate the combo box when the jsp page is first loaded
X Luo
Greenhorn
Joined: Aug 19, 2002
Posts: 5
posted
0
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
posted
0
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
posted
0
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