Server may be a device or a computer virus that receives and responds to the request made by another program, referred to as a client. It's wont to direct the network resources and also for running the program or software that gives services.
There are two sorts of servers:
Web Server
Web servers carry only web or servlet containers. It is often made for servlet, jsp, struts, jsf etc. It cannot be used for EJB.
It is a computer where online content is often stored. Generally web servers are often wont to host the online sites but they also used other web servers also like FTP, email, storage, and gaming etc.
Some Web Servers Examples are: Apache Tomcat and Resin.
It can answer the client appeal in either of the subsequent two possible ways:
Representation of Web Server with the help of block diagram is given below:
Application Server
Application servers carry Web and EJB containers. It is often made for servlet, jsp, struts, jsf, ejb etc. It's a component based product that lies within the middle-tier of a server centric architecture.
It provides the middleware services for state maintenance and security, alongside persistence and data access. It's a kind of server designed to put in, operate and host associated services and applications for the IT services, end users and organizations.
Representation of Application Server is given below with the help of block diagram: