This question already has an answer here:
what is the difference between Application Server and Web Server in Java? please let me know about this and have some examples from them.
A web server isn't specific to Java. It is simply a server for hosting content accessed via HTTP/HTTPS. Examples would be Apache HTTPD and nginx.
A Java application server actually hosts and executes Java application code. Examples include servlet containers such as Apache Tomcat, Jetty, etc. and Java EE containers such as J