Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Java apps need an application server and .Net just IIS Web Server?

Tags:

java

.net

Why is there so much confusion in the java world with various servers like apache, tomcat, jboss, jetty, etc and in .Net world it is just IIS that does that job. I would like to understand the need and use of it and am not starting a java vs. .net.

like image 602
Srikar Doddi Avatar asked Oct 17 '10 18:10

Srikar Doddi


People also ask

Why do we need both a web server and an application server?

A web server accepts and fulfills requests from clients for static content (i.e., HTML pages, files, images, and videos) from a website. Web servers handle HTTP requests and responses only. An application server exposes business logic to the clients, which generates dynamic content.

Why does Java need an application server?

You need Application Server as follow: It provides you useful services like automatic transaction,Authentication,Authorization,Lifecycle management. To remember large user data across pages using ejb's pertaining to a client.

What is the difference between web server and application server in Java?

Q: What is the difference between an application server and a Web server? A: A Web server exclusively handles HTTP requests, whereas an application server serves business logic to application programs through any number of protocols.

Is IIS a web server or application server?

Microsoft IIS (Internet Information Services) is a free web server software package for Windows Server. IIS only runs on Windows operating systems.


1 Answers

There are several reasons.

A Java EE app server is a transaction monitor for distributed components. It provides a number of abstractions (e.g., naming, pooling, component lifecycle, persistence, messaging, etc.) to help accomplish this.

Lots of these services are part of the Windows operating system. Java EE needs the abstraction because it's independent of operating system.

It should also be said that the full Java EE specification isn't necessary for developing web applications. JDBC, the part of Java that deals with relational databases, is part of Java SE proper. Java EE adds on servlets, which are HTTP listeners, and Java Server Pages, which is a markup language for generating servlets. You can develop fully functional web applications using just these technologies and Java SE. Tomcat and Jetty are two servlet/JSP engines that can stand in for full Java EE app servers.

If you take note of the fact that .NET has HTTP listeners built into the System.Net module, you realize that it's as if .NET took a page from Java and folded the javax.servlet functionality into the framework.

If you add Spring and a messaging functionality like ActiveMQ or RabbitMQ, you can write complete applications without having to resort to WebLogic, WebSphere, JBoss, or Glassfish. You don't need EJBs or the full Java EE spec.

UPDATE:

Spring Boot offers the possibility of developing and running full-featured Java applications as an executable JAR file. There's no need for any Java EE app server, just JDK 8 or higher.

like image 110
duffymo Avatar answered Sep 25 '22 18:09

duffymo