본문 바로가기
Programming/Java, Spring

[Java 기초문법] Web and HTTP's basic working logic, Spring frame and tomcat underneath

by Renechoi 2022. 10. 22.

[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 

 

 

 

 

 

 

 

 

 

반응형