1. [WebContent] → [index.html] 생성 및 추가
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
</body>
<script>
window.onload = function(){
location.href="/02/index.do";
}
</script>
</html>
2. [WebContent] → [views] → [index.jsp] 생성 및 추가
<%@page import="java.util.Calendar"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
Hello 02_resource
</body>
</html>
3. [해당 프로젝트] → [src/main/java] → [com.portfolio.www.controller] 패키지 생성 → [IndexController] java 파일 생성
[IndexController] 작성
package com.portfolio.www.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class IndexController {
public IndexController() {
System.out.println("\\n\\n---------------------------02_resource 생성---------------------------\\n\\n");
}
@RequestMapping("/index.do")
public String indexPage() {
return "index";
}
}
4. [context root] 경로 변경 (index.html에서 /02/… 지정했으니까!)
- [해당 프로젝트] → [Web Project Settings] → [Context root: 02_resource → 02 ]

5. tomcat 연결 후 확인