일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- 스프링부트 테스트코드
- 운영체제
- 개발자기술면접
- 내가해냄
- 자바스크립트
- 테스트코드
- 스프링 부트와 AWS로 혼자 구현하는 웹 서비스 2장
- jpa
- 오늘도
- CS
- 그래도일단
- 스프링부트와 AWS로 혼자 구현하는 웹 서비스
- 스프링부트
- 어찌저찌해냄
- AWS EC2 구현
- 스프링부트와 AWS로 혼자 구현하는 웹서비스
- 기술면접
- 스프링 부트와 AWS로 혼자 구현하는 웹 서비스
- 트랜지스터
- Flexbox
- Today
- Total
개발 공부
코드로 배우는 스프링 웹 프로젝트 Chapter 1 본문
Spring을 다시 복습하고자 집에 있던 책을 다시 폈다
Part 1은 개발환경설정 파트이므로 내가 참고한 부분만 정리해서 적겠음!!
해당 책은 21년도에 나온 책이므로 프로그램도 옛 버전을 구해서 적용해야 한다.
1. 첨에 이클립스를 깔아 쓰려다가 STS3을 따로 다운 받았다.
https://github.com/spring-attic/toolsuite-distribution/wiki/Spring-Tool-Suite-3
GitHub - spring-attic/toolsuite-distribution: the distribution build for the Spring Tool Suite and the Groovy/Grails Tool Suite
the distribution build for the Spring Tool Suite and the Groovy/Grails Tool Suite - GitHub - spring-attic/toolsuite-distribution: the distribution build for the Spring Tool Suite and the Groovy/Gra...
github.com
위의 주소에서 확인 가능하다.
이후는 책의 내용을 참고했다.
그러나 위의 링크에서 STS3을 다운 받은 후 새 프로젝트 생성했을 때 home.jsp에서(정확히는 아래 코드에서) 에러가 떴었는데
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
The superclass "jakarta.servlet.http.HttpServlet" was not found on the Java Build Path
라는 첫 번째 에러와
Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"
라는 두 번째 에러가 떴었다.
환경 설정부터 에러가 뜨면 힘이 빠지지만 그래도 차분하게 해결해 보자 ㅎㅋㅎㅋ
첫 번째 에러는 톰캣 서버를 연결시켜 주면 되는 문제인 듯하다. 아래 블로그에서 큰 도움을 받았다.
https://computer-science-student.tistory.com/475
[이클립스, Eclipse] The superclass "jakarta.servlet.http.HttpServlet" was not found on the Java Build Path 에러
Eclipse The superclass "jakarta.servlet.http.HttpServlet" was not found on the Java Build Path 에러 이클립스에서 The superclass "jakarta.servlet.http.HttpServlet" was not found on the Java Build Path 에러가 발생하는 경우가 있다. 이 경
computer-science-student.tistory.com
두 번째 에러는 의존성 주입만 하면 금방 해결 된다.
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
위의 코드를 pom.xml에 주입한다.
pom.xml에 수정할 부분이 책에 또 나와 있으니 전부 수정 후 Maven 업데이트 고
+ 프로젝트 run 했을 때 Run On Server 창의 localhost 폴더에 톰캣이 안 보인다면 거기에 new 어쩌고 하는 게 있음
거기다 톰캣 추가해 주면 된다