dev/JSP

intellij javaee web project 개발설정

아디봉 2023. 5. 11. 16:05

개발정보 

IntelliJ IDEA Community Edition 2023.1.1

java 11

tomcat 9 

 

web project 프로젝트 생성

1) new project 클릭

 

2) Empty Project 선택 

name : 프로젝트명 입력

 

3)  폴더 및 파일생성

- webapps 폴더생성

- WEB_INF 폴더생성

- web.xml 파일생성

- 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>DynamicWEb</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.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
hello index
</body>
</html>

 

smart start plugin  설치 및 tomcat 설정