what is the main use of .ear and .war and .jar file? how it is interrelated, without .ear file,can i run a servlet program in j2ee?
Joined: Jul 05, 2001
Hi raj, The main use of different files is as follows. 1) .jar(Java archive) file This is used to create jar for ejb classes(Remote,Home,Implementation) and META-INF. Also jar can be used when you want ship your own classes in .jar format (Eg being j2ee.jar or struts.jar) 2) .war(web archive) file This is used to create the web archive.This will have all the classes,web.xml other web required files. 3) .ear (Enterprise Archive) file This is used to combine .war and .jar files for enterprise deployment. 4) .rar (Resource Archive) file This is used to archive the Resource adapter files (for JCA only). The major use of this formats is that it helps us to ship the application on different servers. yes servlet can be run through .war application and also through .ear files Thx Mahesh
sharp shooter, and author
Joined: May 10, 2000
"raja_kamal3", Thanks for joining JavaRanch, but could you just take a quick look at the naming policy and edit your profile accordingly. Thanks! Simon Bartender (moderator) of "J2EE and EJB" forum