[Java 기초문법] by Professional Java Developer Career Starter: Java Foundations @ Udemy
Web & HTTP 작동의 기본 원리
localhost:8080에서 무슨 일이 일어난 것인지 살펴보자.
loopback address : 127.0.0.1
refer to the current computer address = this operator
and this address has an alias which is localhost.
what is :8080 ?
imagine that the computer is a house.
doors with windows = > ports , in generic terms.
Likewise a computer has a port. with labeled with numbers, which can be arbitrary.
The purpose of this port is providing and service of transferring data in and out.
They wait for a request.
so when you hit a specific number, port, means that there might be a program or server that is opening the gate listening a specific requests from the outside.
Follows is a log the data sent in and out.
This is basically showing an information was went in the request and a little bit of the information that was sent back in the response.
here a verb GET is a part of a computer language HTTP, it is a one of a common operations defined by this protocol, specifying that "I want to retrieve some data." When send, that might be with a verb called post.
Let's get back to the code and see, it acutally works in 2 ways, one of which is a kind of server program called Tomcat by default, embedded int it, and what it actually does is that opening up a port, and will sit there and listen for incoming requests.
Tomcat is a Java centric web server, by default, with a request retuning html.index, thus showing up "Hello, world."
so our browser is speaking a language Hypertext Transfer Protocol between itself and a server, and it's receiving back a response and inside of that response is a document written in another language of HTML, and then the browser has to interpret that HTML to display something on the screen
'Programming > Java, Spring' 카테고리의 다른 글
[Java ] 테스트 코드를 작성하는 이유, TDD 코드 예시 (0) | 2022.10.23 |
---|---|
[Java 기초문법] Spring | controller 만들기, thymeleaf 이용해 페이지 만들기, Bootstrap Table, using Formatter interface (0) | 2022.10.22 |
[Java 기초문법] 스프링 시작하기 from start.spring.io to first running (0) | 2022.10.22 |
[Java 기초문법] 자바와 데이터베이스 연결하기, JDBC code, H2, Squirrel SQL (0) | 2022.10.22 |
[Java 기초문법] 데이터베이스 'UD' in 'CRUD' with H2 and Squirrel SQL (0) | 2022.10.22 |