JAR, WAR and EAR

2005/08/15 02:22
Jar, War, Ear 파일들의 차이점은?

세 파일은 모두 압축 파일이고, 구조적인 차이는 없으므로 확장자를 서로 바꿔도 문제는 없지만,,,,,
만들어진 목적은 서로 틀리다.

Jar: 자바클래스 파일들이 주이며, EJB 파일들을 포함.
War: 웹 애플래케이션에 관련된 파일들을 포함한다. 주로 JSP, Servlet 파일들.
Ear: 엔터프라이즈 애플리케이션에 필요한 모든 파일들을 포함한다. Jar 파일과 War 파일들을 포함.



Differences .jar, .war and .ear files ???

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.

Reference: http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci1105646,00.html





An EAR file contains all the JARs and WARs belonging to an application. JAR files contain the EJB classes and WAR files contain the web components (JSPs, static pages, servlets, gifs, etc.). The J2EE application client's class files are also stored in a JAR file. EARs, JARs, and WARs all contain an XML-based Deployment Descriptor

Reference: http://www-1.ibm.com/support/docview.wss?uid=swg21066338

Trackback

Trackback Address :: 이 글에는 트랙백을 보낼 수 없습니다

Comments

Write your comment

댓글 입력 폼
[로그인][오픈아이디란?]
오픈아이디로만 댓글을 남길 수 있습니다