Web Server


Web Server

A web server is software and hardware that uses HTTP and other protocols to respond to client requests made over the World Wide Web.
The main job of a web server is to display website content through storing, processing and delivering webpages to users.
Protocols

  • HTTP - Hypertext Transfer Protocol
  • SMTP - Simple Mail Transfer Protocol
  • FTP - File transfer protocol (etc.)
webserver

Server can be refer as hardware and software or both working together.

Hardware: webserver is a computer that stores webserver software and website component files. Ex. HTML, CSS, image etc. Webserver connect to the internet and support physical data interchange with other devices connected to the web.
Software: A web server software that runs on the web site hosting Server computer. Its main purpose is serving web pages; which means it waits for requests from web browsers (also known as clients) and responds by sending the required data back. This client-server interaction is the hallmark of how the web works.

Static vs Dynamic
Static

We call it "static" because the server sends its hosted files as-is to your browser.

Dynamic

Dynamic webservers consists of a static web server plus extra software, most commonly an application server and a database. We call it "dynamic" because the application server updates the hosted files before sending content to your browser via the HTTP server.


Web Container

A web container is the component of a web server that interacts with Java servlets. A web container manages the life cycle of servlets; it maps a URL to a particular servlet while ensuring that the requester has relevant access-rights.

The web container implements the web component aspect of the Java engineering architecture; it specifies a run time environment for various components such as security, concurrency, transaction, and deployment.

webserver
  • The client sends a request to a web server.
  • The web server, which contains a servlet, sends that request to the container.
  • The container passes the request to the respective servlet.
  • The servlet methods are loaded.
  • The servlet hands over the relevant response to the container, which passes it to the server. Eventually, the response reaches the client.