war files ppt
DESCRIPTION
ppt on the topic war files (web application acrhieve) subject-java...TRANSCRIPT
WAR FILES
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
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
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
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
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)
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
HOW TO CREATE A WAR FILESTEP 1
STEP2
STEP 3
STEP 4
STEP 5
STEP 6
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.
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.
THANK YOU !!!