인프런 커뮤니티 질문&답변

hoon님의 프로필 이미지
hoon

작성한 질문수

스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술

서블릿으로 회원 관리 웹 애플리케이션 만들기

갑자기 화면이 아예안뜨네요 (페이지가 작동하지 않습니다.)

작성

·

673

0

스크린샷 2023-07-21 오전 10.34.10.png실행을 시켰을때 계속 이렇게 뜨는데 이유가 뭘까요 ㅠㅠ 서버는 돌리고있는데..

 

 

 

 

10:33:51 AM: Executing ':ServletApplication.main()'...

> Task :compileJava UP-TO-DATE

> Task :processResources UP-TO-DATE

> Task :classes UP-TO-DATE

> Task :ServletApplication.main()

. ____ _

/\\ / ___'_ __ (_)_ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

\\/ ___)| |_)| | | | | || (_| | ) ) ) )

' |____| .__|_| |_|_| |_\__, | / / / /

=========|_|==============|___/=/_/_/_/

:: Spring Boot :: (v2.7.13)

2023-07-21 10:33:53.131 INFO 96921 --- [ main] hello.servlet.ServletApplication : Starting ServletApplication using Java 11.0.18 on gim-yeonsuui-MacBookAir.local with PID 96921 (/Users/kimyunsoo/Downloads/servlet 5/build/classes/java/main started by kimyunsoo in /Users/kimyunsoo/Downloads/servlet 5)

2023-07-21 10:33:53.133 INFO 96921 --- [ main] hello.servlet.ServletApplication : No active profile set, falling back to 1 default profile: "default"

2023-07-21 10:33:53.590 INFO 96921 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)

2023-07-21 10:33:53.596 INFO 96921 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]

2023-07-21 10:33:53.596 INFO 96921 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.76]

2023-07-21 10:33:53.719 INFO 96921 --- [ main] org.apache.jasper.servlet.TldScanner : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

2023-07-21 10:33:53.724 INFO 96921 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext

2023-07-21 10:33:53.724 INFO 96921 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 565 ms

2023-07-21 10:33:53.849 INFO 96921 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: ServletContext resource [/index.html]

2023-07-21 10:33:53.908 INFO 96921 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''

2023-07-21 10:33:53.913 INFO 96921 --- [ main] hello.servlet.ServletApplication : Started ServletApplication in 1.248 seconds (JVM running for 1.505)

2023-07-21 10:34:03.715 DEBUG 96921 --- [nio-8080-exec-1] o.a.coyote.http11.Http11InputBuffer : Before fill(): parsingHeader: [true], parsingRequestLine: [true], parsingRequestLinePhase: [0], parsingRequestLineStart: [0], byteBuffer.position(): [0], byteBuffer.limit(): [0], end: [0]

2023-07-21 10:34:03.716 DEBUG 96921 --- [nio-8080-exec-1] o.a.coyote.http11.Http11InputBuffer : Received [GET / HTTP/1.1

Host: localhost:8080

Connection: keep-alive

Cache-Control: max-age=0

sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"

sec-ch-ua-mobile: ?0

sec-ch-ua-platform: "macOS"

Upgrade-Insecure-Requests: 1

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7

Sec-Fetch-Site: none

Sec-Fetch-Mode: navigate

Sec-Fetch-User: ?1

Sec-Fetch-Dest: document

Accept-Encoding: gzip, deflate, br

Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7

Cookie: JSESSIONID=8E2F5508F193C4F51F10990F1DABC272

If-Modified-Since: Tue, 18 Jul 2023 06:54:31 GMT

]

2023-07-21 10:34:03.756 DEBUG 96921 --- [nio-8080-exec-1] o.a.coyote.http11.Http11InputBuffer : Before fill(): parsingHeader: [true], parsingRequestLine: [true], parsingRequestLinePhase: [0], parsingRequestLineStart: [0], byteBuffer.position(): [0], byteBuffer.limit(): [0], end: [811]

2023-07-21 10:34:03.756 DEBUG 96921 --- [nio-8080-exec-1] o.a.coyote.http11.Http11InputBuffer : Received []

202

답변 2

0

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

클라이언트가 특정 url로 접속하면 스프링 프레임워크는 이 경로가 앱을 실행할 때 등록한 뷰 매핑에 있는지 검사하게 됩니다. 여기서 마땅한 매핑 결과를 찾지 못하거나 (404오류) 혹은 URL은 찾았지만 요구하는 HTTP메서드가 일치하지 않는경우(405오류)에 오류가 발생합니다.

감사합니다.


0

hoon님의 프로필 이미지
hoon
질문자

MvcMemberFormServlet 를 비워뒀더니 그런거였네요
근데 왜 비워두면 오류가 나면서 저런페이지가 뜨는건가요?? 
ServletApplication 가 시작의 기준아닌가요??
hoon님의 프로필 이미지
hoon

작성한 질문수

질문하기