What is War,jar bag,. Ear:-----Reprint

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.