Web Application Archives- war files

Jun 18 2010 | By Admin

WEB APPLICATION ARCHIVES


WAR file developed by Sun Microsystem, pretty similar to JAR(Java archive File) act as containers with robust folder structure containing all the files and goodies needed to run a web application .WAR file represents a web application which can run on a server,web clients are packaged into this.Web Application archives consist of server side utility classes such as java bean, database and carts, client side classes such as applets and static contents such as HTML files, Images,sound files etc in addition to various Web Components.



The static components in the web application archives are also refered as web resources.The web application archives follows a strict directory structure. Root is the top level directory of web application archive files,it is here where the jsp pages,client side classes (applets),archives and web resources like HTML, Images, Property files are stored.


WEB-INF is a sub directory of Root. It contains



Creating Web Application Archive File


The deploy tool automatically creates war file while you add a new component to the web application.

WAR file can also be created by




One of the shortcomings of WAR is that when using it in a very dynamic scenario such as at the time of vigorous testing, there arises some cases of frequent change in the files.But these changes cannot be made during run time.In such cases the WAR file should be redeployed and regenerated with newly updated files.



Developer facing such scenarios can use JEE containers, also known as explode archives, which allows the web application to be deployed as directory structure instead of single file.

← Back to Blog