- RedirectTest.jsp 소스
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
이 내용이 나올까요?
<hr>
<!-- sendRedirect와 마찬가지로 페이지 자체가 바뀜 -->
<c:redirect url = "ForToken.jsp"/>
<!-- 페이지 자체가 바뀌진 않음. 주소가 같다. -->
<!-- <jsp:forward page="ForToken.jsp"> -->
</body>
</html>
- ForToken.jsp 소스
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<c:forTokens items = "korea, team.Fighting, jsp.Fighting" delims=",." var="token">
<c:out value="${token}"/><br>
</c:forTokens>
</body>
</html>
- 결과