GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  EJB
Go To First  |  Previous Question  |  Next Question 
 EJB  |  Question 34 of 175    Print  
What is the difference between EAR, JAR and WAR file

Answered by Jey on 2005-05-08 11:23:41: In J2EE application modules are packaged as EAR, JAR and WAR based on their functionality  
JAR
EJB modules which contains enterprise java beans class files and EJB deployment descriptor are packed as JAR files with .jar extenstion 
WAR 
Web modules which contains Servlet class files,JSP FIles,supporting files, GIF and HTML files are packaged as JAR file with .war( web achive) extension 
EAR 
All above files(.jar and .war) are packaged as JAR file with .ear ( enterprise archive) extension and deployed into Application Server.



  
Total Answers and Comments: 3 Last Update: May 30, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 08, 2005 11:23:41   #1  
Jey        

RE: What is the difference between EAR, JAR and WAR file
In J2EE application modules are packaged as EAR, JAR and WAR based on their functionality  
JAR
EJB modules which contains enterprise java beans class files and EJB deployment descriptor are packed as JAR files with .jar extenstion 
WAR 
Web modules which contains Servlet class files,JSP FIles,supporting files, GIF and HTML files are packaged as JAR file with .war( web achive) extension 
EAR 
All above files(.jar and .war) are packaged as JAR file with .ear ( enterprise archive) extension and deployed into Application Server.

 
Is this answer useful? Yes | No
April 07, 2006 09:47:37   #2  
secretcoder Member Since: April 2006   Contribution: 4    

RE: What is the difference between EAR, JAR and WAR fi...
hai ,There are no structural differences between the files; they are all archived using zip-jar compression. However, they are intended for different purposes.--Jar files (files with a .jar extension) are intended to hold generic libraries of Java classes, resources, auxiliary files, etc. --War files (files with a .war extension) are intended to contain complete Web applications. In this context, a Web application is defined as a single group of files, classes, resources, .jar files that can be packaged and accessed as one servlet context. --Ear files (files with a .ear extension) are intended to contain complete enterprise applications. In this context, an enterprise application is defined as a collection of .jar files, resources, classes, and multiple Web applications. Each type of file (.jar, .war, .ear) is processed uniquely by application servers, servlet containers, EJB containers, etc. RegardsSecretcoder
 
Is this answer useful? Yes | No
May 30, 2007 10:34:46   #3  
Vineet        

RE: What is the difference between EAR, JAR and WAR fi...
EAR is an EEnterprise Aapplication archive and may contain ejb JAR files, WAR files, and RAR (connector) files. They may also contain third-party libraries - but you have to know how to manipulate the Java extension facilities (e.g. MANIFEST.MF Class-Path directive) to make that work well.

WAR is an Web Aapplication archive and contains JSPs, "normal" HTTP served files (HTML, images, etc.), servlets, tag libraries, and such.

JAR is the "normal" Java Aapplication archive, but in this context it usually contains EJBs instead of code libraries or runnable (e.g. from outside an application container) applications.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape