<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>/WEB-INF/views/list.jsp</welcome-file>
</welcome-file-list>
서버를 실행시키고 "localhost:8080/" 으로 접속시, 먼저 가장 첫번째 <welcome-file>인 index.jsp를 불러온다.
하지만 index.jsp가 나오지 않고 자꾸 톰캣의 시작페이지만 나왔다...
난 두가지 방법 모두 사용하고 오류를 해결할 수 있었다.
오류 해결 - @RequestMapping
controller에 @RequestMapping에 경로를 "/"로 잡은 항목이 있으면 해당 항목이 가장 상위페이지("localhost:8080/")가 된다.
따라서 해당 부분을 주석처리 해주었다.
오류 해결 - 8080 포트 shutdown
lifecyclebase.handlesubclassexception 구성요소 [connector["http-nio-8080"]]을(를) 초기화하지 못했습니다.
tomcat을 빌드할 때 이 부분이 신경쓰여, 8080 포트를 찾아 킬하고 다시 빌드를 하니 성공했다!
lsof -i tcp:8080
실행중인 8080 포트 찾기 (mac)
sudo kill -9 [PID 번호]
8080포트 닫기
틀린부분이 있다면 지적해주시면 감사하겠습니다.
Reference
web.xml - <welcome-file-list>란?
'Server' 카테고리의 다른 글
[Tomcat] The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. 404 에러 해결 (0) | 2024.09.23 |
---|---|
[ssh] not a directory 해결, ssh란? (0) | 2024.09.21 |
[JPA] 기본키 생성 전략 / @GeneratedValue (0) | 2024.08.25 |
[JPA] 영속성 컨텍스트 #2 (0) | 2024.08.08 |
[SpringBoot] Entity 생성하기 / JPA 간단한 예제 (0) | 2024.08.07 |