분명히 잘 실행되었는데, 모든 Controller들을 pageController로 변경하고 FrontController를 생성해서 거쳐가도록 코드를 수정하던 중에 오류가 발생했다.
연결할 url이 없다니..일단 모든 파일의 경로를 확인했으나 이상 無.
그래서 구글링을 통해 아래의 3가지 방법을 시도해봤다.
1. Tomcat 확인
2. web.xml 확인
3. server의 server.xml 확인
1~2번 확인하고 3번을 시도해보던 중에 server.xml에서 데이터베이스 연결 정보 설정 코드가 누락되어 있는 것을 확인.
<Resource name="jdbc/studydb" auth="Container" type="javax.sql.DataSource"
maxActive="10" maxIdle="3" maxWait="10000"
username="study"
password="study"
driverClassName="com.mysql.cj.jdbc.Driver"
url="jdbc:mysql://localhost:4306/studydb"
closeMethod="close"
/>
이렇게 데이터베이스 연결 정보 설정 코드를 추가하니 오류 없이 제대로 실행되었다.
Mission Clear.
'공부(TIL) > Error' 카테고리의 다른 글
error: Attempt to recreate a file for type..... (0) | 2024.05.07 |
---|---|
ORA-00942: table or view does not exist (0) | 2024.04.29 |
javax.servlet.ServletException: 파일을(를) 찾을 수 없습니다. (0) | 2024.04.02 |
The declared package "" does not match the expected package "" 오류 (0) | 2024.04.02 |
Uncaught ReferenceError (0) | 2024.03.13 |