JSP ํ๋ก์ ํธ ์์ฑํ๊ธฐ
1.
[File] > [New] > [Dynamic Web Project]
a.
Project Name : Test
b.
Target runtime : Apache Tomcat v9.0
c.
Dynamic web module version : 3.1
2.
WebContent
a.
[์ฐํด๋ฆญ] > [New] > [JSP]
b.
File name : index.jsp
ํ๋ก์ ํธ์์ Server ์ ํํ๊ธฐ
1.
ํ๋ก์ ํธ ์ฐํด๋ฆญ
2.
Properties
3.
Server
4.
Tomcat Server ์ ํ
5.
[Apply]
JSP ํ๋ก์ ํธ ์คํํ๊ธฐ
1.
ํ๋ก์ ํธ ์ฐํด๋ฆญ
2.
[Run As] > [Run On Server]
๋ฉ์ธ ํ๋ฉด (index.jsp) ๋ง๋ค๊ธฐ
1.
New
2.
JSP File
3.
์ฝ๋ ์์ฑ
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>๋ฉ์ธ ํ์ด์ง</h1>
</body>
</html>
HTML
๋ณต์ฌ
์๋ฒ ์คํ
1.
ํ๋ก์ ํธ ์ฐํด๋ฆญ
2.
RUN As
3.
Run opn Server
์ดํด๋ฆฝ์ค ํฐ์บฃ ์๋ฒ ์คํ ์, ํฌํธ ์๋ฌ
The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.
์๋ฒ๋ ํ๋ ์ด์์ ์ ํจํ์ง ์์ ํฌํธ๋ก ์ธํด ์์ํ ์ ์์ต๋๋ค. ์๋ฒ ํธ์ง๊ธฐ๋ฅผ ์ด๊ณ ์ ํจํ์ง ์์ ํฌํธ๋ฅผ ์์ ํ์ญ์์ค.
๊ฒฐ๊ณผ ํ๋ฉด
ํ๋ก์ ํธ๋ฅผ ์๋ฒ์ ๋ฑ๋ก ๋ฐ ์ ๊ฑฐ
1.
[Windows] > [Show View] > [Other] > [Server]
2.
Server ์ฐํด๋ฆญ
3.
[Add and Remove]
4.
[Add] OR [Remove]
Eclipse ์น๋ธ๋ผ์ฐ์ ์ค์ ํ๊ธฐ
1.
[Windows] > [Web Browser]
2.
Defulat System Browser ๋๋ Chrome