Often listen to the development said War,jar,car, these are what kind of stuff?
. Jar:
Java Archive;
Contains: class, properties file, is the smallest unit of file encapsulation;
Deployment file: Application-client.xml;
Level: small;
. War:
Web Archive;
Includes: Servlets, JSP pages, JSP tag libraries, jar library files, html/xml documents and other common resource files, slices, audio files, etc.;
Deployment file: Web. xml;
Level: Medium;
War Package Generation:
A. With the IDE, such as Eclipse, you can then right click on the project to select "Export";
B. Handmade: Executes the package name that the JAR-CVF will generate. The name of the directory to compress for the war
The war package is actually a zip-compressed file, compressed into a zip format with WinRAR, and modified with the extension war.
. Ear:
Enterprise Archive;
Include: In addition to the jar, war, but also include EJB components;
Deployment file: Application.xml;
Level: large;
From the perspective of the end customer, the. jar file is an encapsulation, and they do not need to know how many. class files are in the. jar file, and the functionality and function of each file also gives them the desired result.
War package: is a Web application, usually a Web site, into a package deployed into a container.
Jar Package: Typically, a generic class is referenced at development time, and a package facilitates storage management.
Ear Package: An enterprise application, typically an EJB that is called an ear package.
All packages are made with jars, except that the target file has a different extension.
jar--Package Class
war--Encapsulating a Web site
ear--encapsulated EJB
A Web Component developer performs the following tasks to pass a war file that contains a Web component:
| Writing and compiling the servlet source code
| Writing JSP, HTML files
| Specifies the development descriptor for the Web
| Bonding. Class,.jsp,.html and deployment descriptors to a war file.
The war package can be placed in the WebApps or work directory, and it can be decompressed automatically as Tomcat starts.
Or you can publish the war package via the Tomcat admin page, which actually copies the war package to the WebApps directory.
Finally, about the war, the package method of the jar package, the command line and the use of JBuilder or Eclipse, click here http://www.iteye.com/topic/254141
What is War,jar bag,. Ear:-----Reprint