i want to create combo box/ drop down menu with a list from my servlet.
can i use a for an in the for write the tag <option>
of the select component and it will create the options dynamically?
there is other way? this way should work?
Printable View
i want to create combo box/ drop down menu with a list from my servlet.
can i use a for an in the for write the tag <option>
of the select component and it will create the options dynamically?
there is other way? this way should work?
Have a look at JSTL :)
You can use the foreach tag.
JSP Standard Tag Library (JSTL) c:forEach Tag
// Json
Hi,
you can use c:if tag of jstl too to show an element in a select box as selected for a particular condition.
you have to use standard.jar in lib.
Core java