은 arraylist 값을 표시하기 위해 다음 jsp 태그를 가지고 있습니다. zoneInformation
에는 [North, South, East, West]
이 포함되어 있습니다.jsp에서 dropdownlist의 값을 설정하는 방법은 무엇입니까?
<html:form action="addcountry">
<%@ page import="java.util.List"%>
<%@ page import="java.util.ArrayList"%>
<html:select property="zone" styleClass="text ui-widget-content ui-corner-all">
<% ArrayList ls = (ArrayList)request.getAttribute("zoneInformation");
for(int i=0;i<ls.size();i++){
%>
<html:option value=" "><%=ls.get(i)%></html:option>
<%}%>
</html:select>
</html:form>
이 드롭 다운 목록에 값을 설정하는 방법 ....? 대신 scrptlets의 c:forEach
:
JSTL은 단순히 놀랍습니다 ....! mycode가 잘 작동합니다! ur 도움을위한 감사합니다 !!! :-) – Manivannan