jsp - Dynamically adding value to drop down -


hi below code dynamically populate drop down. when trying nothing getting populated in dropdown. appreciated.

<% list<string> w = new arraylist<string>();     w.add("john");     w.add("joseph");     %>     <td><select id="web" name="web">           <c:foreach var="item" items="${w}">               <option><c:out value="${item}"/></option>          </c:foreach>      </select></td>  

end foreach properly

</c:foreach> 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -