I am new to programming. And since yesterday I have been tormented by the question. Read a book about Servlet. It says that any server consists of 16 bit (65535) ports. Only one program can be written to one port. "This is a piece of software running on the server hardware.".

So I’m writing all web applications to free ports (for example, 1003, 1004), since you can write only one program to each port, and request data from this application through port 80?

I apologize in advance if terminoligiya and the question is not entirely correct

  • Ie port 80, I do not use. I write applications to the port that responds to HTTP requests. And I request directly through it? - Rafael
  • Web applications, especially servlets, are usually "stored" all on one port. In addition to the port, a web application has a url for example. Each application has its own url. Port captures the application server. It receives requests from the url of a particular application. And the server calls the appropriate url application. In such a simple way infinitely many applications can work on one port. - Sergey
  • @Sergey can, as the answer publish? - Nick Volynkin
  • @NickVolynkin I think in this case, you need a deeper explanation on the fingers. I have not yet gained such an experience. For this you need talent. - Sergey

0