war files ppt

16
WAR FILES

Upload: aniran

Post on 27-Apr-2015

253 views

Category:

Documents


4 download

DESCRIPTION

ppt on the topic war files (web application acrhieve) subject-java...

TRANSCRIPT

Page 1: War files ppt

WAR FILES

Page 2: War files ppt

INTRODUCTION: A WAR file (which stands for “Web application

archive") is a JAR file used to distribute a collection of JavaServer Pages, servlets, Java Classes, XML files, tag libraries and static Web pages (HTML and related files) that together constitute a Web application.

File extension: .warDeveloped by: Sun MicrosystemsContainer for: JSP, JavaServlet

Page 3: War files ppt

USES OF WAR Web Archive (WAR) file is a Java archive file

used to store jsp, servlets, classes, meta data information, images and Sound and tag libararies etc.

WAR files are used to package Web modules. A WAR file is for a Web application deployed to a servlet/jsp engine

Page 4: War files ppt

ABOUT JAR FILESis java archieve filecontain all class file,image,sound and other

files which will be needed in whole application.

users can create or extract JAR files using the jar command that comes with the JDK. They can also use zip tools.

the JavaTM Archive (JAR) file format enables you to bundle multiple files into a single archive file. jar was designed mainly to facilitate the packaging

Page 5: War files ppt

COMMANDS FOR JARjar cf jar-file input-file(s) The options and arguments used in this

command are:• Use c option  to create a JAR file.• jar-file is the name of your  JAR file. You can use any filename for a JAR file. By convention, JAR filenames are given a .jar extension,it is mandatory any way

The command for viewing the contents of a JAR file is:

jar tf jar-file

Page 6: War files ppt

ABOUT EAR FILEAn Enterprise Archive file represents a J2EE

application that can be deployed in a Web Sphere application server

EAR files are standard Java archive files and have the file extension .ear

contain ejb, web or application client module. ear file is complete j2ee application file that contain all(jar +war

In short we can say;EAR = WAR(Web module) + JAR(can be EJB

module or application client module)

Page 7: War files ppt

DIFFERENCESWAR JAR EAR

Intended to hold generic libraries of Java classes, resources, auxiliary files, etc.

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.

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.

.WAR .JAR .EAR

Page 8: War files ppt

HOW TO CREATE A WAR FILESTEP 1

Page 9: War files ppt

STEP2

Page 10: War files ppt

STEP 3

Page 11: War files ppt

STEP 4

Page 12: War files ppt

STEP 5

Page 13: War files ppt

STEP 6

Page 14: War files ppt

ADVANTAGES OF WAR FILESIt is a format supported by all the Java

application/web servers.

Build tools support WAR files.

IDEs support creating WAR files.

Integrates library distribution with static and

dynamic web pages.

A single file to distribute.

Page 15: War files ppt

DISADVANTAGES OF WAR FILESSome application servers (notably JBoss)

implement radically different classloading rules.Build time is too early to hard code all

configuration options into the Web Application Deployment Descriptor

The [Java Endorsed Directories] situation makes it impossible to bundle updates to endorsed libraries inside a WAR File

The time to build and deploy a WAR file increases with the size of the application, especially the number of embedded libraries. The more libraries you use, the longer it takes to iterate through a build/deploy/test cycle.

Page 16: War files ppt

THANK YOU !!!