Skip to main content


Showing posts from December, 2017

Difference b/w JAR,WAR & EAR

A  WAR (Web Archive)  is a module that gets loaded into a  Web container  of a  Java Application Server . A Java Application Server has two containers (runtime environments) - one is a Web container and the other is a EJB container. The  Web container  hosts Web applications based on JSP or the Servlets API - designed specifically for web request handling - so more of a request/response style of distributed computing. A Web container requires the Web module to be packaged as a  WAR file  - that is a special JAR file with a  web.xml  file in the folder WEB-INF . An  EJB container  hosts Enterprise java beans based on the EJB API designed to provide extended business functionality such as declarative transactions, declarative method level security, and multiprotocol support - so more of an RPC style of distributed computing. EJB containers require EJB modules to be packaged as  JAR files  - these have a ejb-jar.xml file in the META-INF folder. Enterprise applications  may con