05array.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<%request.setCharacterEncoding("UTF-8"); %>
<%@include file="/WEB-INF/inc/header.jsp" %>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%@include file="/WEB-INF/inc/top.jsp" %>
<%
	String[] array={"b","c","d"};
%>
<!-- " ", ๋ณ€์ˆ˜ ์ด๋ฆ„ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•˜๋ฉด ์ž˜๋ชป๋œ ๊ฒƒ -->
<c:forEach items="<%=array %>" var="i" varStatus="st">
	${i } ${st.count }<br>
</c:forEach>
</body>
</html>

06collection.jsp

<%@page import="java.util.Map"%>
<%@page import="com.study.common.util.UserList"%>
<%@page import="com.study.login.vo.UserVO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<%request.setCharacterEncoding("UTF-8"); %>
<%@include file="/WEB-INF/inc/header.jsp" %>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%@include file="/WEB-INF/inc/top.jsp" %>
<%
	List<UserVO> userList = new UserList().getUserList();
	Map<String, UserVO> userMap = new UserList().getUsersMap();
	
/* 	for(Map.Entry<String, UserVO> entry : userMap.entrySet() ){
		out.print(entry.getKey());
		out.print(entry.getValue()); //entryValue : userVO
	} */
%>
<c:set var="userList" value="<%=userList %>" />
<c:set var="userMap" value="<%=userMap %>" />

<c:forEach items="${userList }" var="user">
	์ด๋ฆ„ : ${user.userName }, ID : ${user["userId"] },
	pass : ${user.userPass }, role : ${user.userRole }
	<br>
</c:forEach>
<hr>
<c:forEach items="${userMap }" var="entry">
	${entry.key }
	${entry.value } <!-- userVO  -->
	์ด๋ฆ„ : ${entry.value.userName } <br>
</c:forEach>
</body>
</html>