<c:forTokens var="op"items="${goods.op}" delims="/">
<option value="<c:out value="${op}" />"><c:out value="${op}" />
</option>
</c:forTokens>
=============================================================
goods.op에 있는 문자를 /로 구별해서 나눈다.
=============================================================
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:set var="names" value="A:B;C|D" scope="page" />
<html>
<head>
<title>forTokens action</title>
</head>
<body>
<c:forTokens items="${pageScope.names}"
delims=":;|"
var="currentName"
varStatus="status"
>
Family member #<c:out value="${status.count}" /> is
<c:out value="${currentName}" /> <br />
</c:forTokens>
</body>
</html>
댓글 없음:
댓글 쓰기