강의

멘토링

커뮤니티

Inflearn Community Q&A

theegg's profile image
theegg

asked

Spring MVC Part 2 - Backend Web Development Utilization Technology

Servlet Exception Handling - How Error Pages Work

error Message null

Written on

·

1.5K

5

error message 가 null로 표기되네요

 

분명히 404 오류! 메시지가 포함이되어있는데

 

스프링 3.0이상과 2.5버전이 달라서 그런건가요 ?

springmvc

Answer 2

21

theegg님의 프로필 이미지
theegg
Questioner

javax -> jakarta 로 변경해서 해결했습니다.

안녕하세요. sk47kt님, 공식 서포터즈 코즈위버입니다.

스스로 잘 해결하셨습니다 :) 

강의 수강 중 강의 관련 궁금한 사항은 언제든 질문 남겨주세요^^

1

저는 jakarta로 변경해도 여전히 null로만 뜨네요 다른분이 질문 올려주신 것처럼 error-ex 로 호출했을 때만 값이 찍히고 있어요

RequestDispatcher.ERROR_...로 한번 해보세요

log.info("ERROR_EXCEPTION: {}", request.getAttribute(RequestDispatcher.ERROR_EXCEPTION));
log.inf
o("ERROR_EXCEPTION_TYPE: {}", request.getAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE));
log.in
fo("ERROR_MESSAGE: {}", request.getAttribute(RequestDispatcher.ERROR_MESSAGE));
log.i
nfo("ERROR_REQUEST_URI: {}", request.getAttribute(RequestDispatcher.ERROR_REQUEST_URI));
log.
info("ERROR_SERVLET_NAME: {}", request.getAttribute(RequestDispatcher.ERROR_SERVLET_NAME));
log
.info("ERROR_STATUS_CODE: {}", request.getAttribute(RequestDispatcher.ERROR_STATUS_CODE));
lo
g.info("dispatchType={}", request.getDispatcherType());

 

theegg's profile image
theegg

asked

Ask a question