코딩이란 무엇일까

[38일차] 프론트엔드(1)-apache tomcat설치,Dynamic Web Project프로젝트 생성, 서버 연결해보기 본문

국비지원수업

[38일차] 프론트엔드(1)-apache tomcat설치,Dynamic Web Project프로젝트 생성, 서버 연결해보기

둥구는 지굴다 2022. 12. 15. 13:01

아파치 톰캣(apche Tomcat) 설치 및 설정

1. 아래의 페이지로 들어가 Tomcat9를 다운로드하여준다.

Apache Tomcat®https://tomcat.apache.org/download-80.cgi

 

Apache Tomcat® - Apache Tomcat 8 Software Downloads

Welcome to the Apache Tomcat® 8.x software download page. This page provides download links for obtaining the latest versions of Tomcat 8.x software, as well as links to the archives of older releases. Unsure which version you need? Specification versions

tomcat.apache.org

2. 파일 압축을 해제했다면 apche-Tomcat파일 안에 있는 conf파일 안에 있는

logging.properties 파일을 눌러준다

3.java.util.logging.ConsoleHandler.encoding = UTF-8을 MS949로 바꾸어준다.

4.conf파일 안에 있는 Sever.xml을 눌러 아래의 port를 8080으로 되어있을 텐데

8082로 바꾸어 준다.

5.bin파일로 들어가서 cmd창을 켜준다.

cmd창에서 startup.bat을 입력하면 아래와 같은 창이 뜨면 성공이다.

6. 위의 과정을 모두 하였다면 http://localhost:8082/index.jsp 주소로 들어가면 아래의 페이지가 나왔다면 성공


Dynamic Web Project 만들기

1.perspective를 javaEE로 바꾸어준다.

2. 새로운 프로젝트를 만드는데 Dynamic Web Project를 클릭하여 만들어 준다.

3. 파일들은 webapp폴더 안에 만들어 준다

4.html, css, js파일들은  webApp안에 만들어주면 된다. 끝!


이클립스에서 톰캣 사용해서 서버 만들기

1.Alt+Shifr+N을 눌러 새로운 프로젝트를 만든다. Server을 검색하여 Server프로젝트를 하나 생성해 준다.

2.create a new Server을 눌러준다.

3.Tomcat 버전을 본인의 버전에 맞게 선택해준다.

4. 해당 서버를 클릭해 준다.

5. 포트를 설정해 줍니다.

6.startServer를 눌러줍니다. 

7.startServer를 눌렀을 때 아래의 콘솔 창이 나오면 성공한 것입니다.

stsrtServer을 눌렀을 때 에러가 난다면 포트번호를 다시 설정해봅니다.

8. 해당 버튼을 눌러줍니다.

9.server을 클릭한 뒤 next를 눌러줍니다.

10. 원하는 프로젝트를 선택 후 Finish를 합니다.

11.html 파일이 뜨면 성공!

Comments