




프로젝트가 생성되었다!














<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
</head>
<body>
<%
String index = "Hello JSP";
%>
<%= index %>
</body>
</html>
✅ 설정 부분 : <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
💡 index.jsp 페이지가 필요한 이유?
🔍 web.xml 페이지를 살펴보자!<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0"> <display-name>jsp</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.jsp</welcome-file> <welcome-file>default.htm</welcome-file> </welcome-file-list> </web-app>위와 같이 웰컴파일에 index 파일이 설정되어있다.
즉, 서버를 처음 실행 했을 때 찾는 파일이 index파일인 것이다.



해당 포트가 이미 사용중이라고 뜬다!

8080 포트에서 이미 프로세스가 실행중이다. 해당 포트를 끄자!


아주 잘 렌더링 되었다!!
이 외에도 기본 설정이 필요하다!





✅ spring 할 때 자주 나타났던... 포트 죽이기!!
✅ 기본 설정이 제일 번거롭고 귀찮은 것 같다.. 그치만 제일 중요한 부분이니 알아두자!