aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes jar & war files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "jar & war files" Watch "jar & war files" New topic
Author

jar & war files

Nagarajan Krishnamurthy
Greenhorn

Joined: Sep 26, 2003
Posts: 20
I have 2 questions :
1.When do we go for jar files and when do we go for war files.And whats the difference between web-inf & meta-inf folders
2.Is there any tool which generates the DD files automatically other than weblogic builder.
Amol Fuke
Ranch Hand

Joined: Apr 08, 2005
Posts: 129
Jar files are basically library files needed for your project while war files are web archieve files where your actual code is.Your code in the war file may use some libraries from the jar files.
We deploy war file and put jar files in the classpath.

Every server has its own UI for building DD.


"There are no mistakes, only lessons"
Senthil Somasundaram
Greenhorn

Joined: Jun 30, 2003
Posts: 17

1.When do we go for jar files and when do we go for war files.And whats the difference between web-inf & meta-inf folders


war file represent a web module in your application.

Use jar files to bundle up the java classes.Example Ejb-jar will contain
the ejb classes.

web-inf folder is needed to build a web module.This folder will contain the web.xml which configure container for your web application.

meta-inf folder will have your deployment descriptor.Ex in ejb folder structure meta-inf directory will have the deployment descriptor for your EJB's.

2.Is there any tool which generates the DD files automatically other than weblogic builder.

Sun ONE Studio will create DD automatically.

Hope this will help you.

Cheers,
Senthil
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

1. We use war files when we package a Web Application. We use Jar files for any Java archive, including an EJB archive. Both War files and EJB Jar files have a structure defined by the J2EE specification. War files will use WEB-INF, EJB Jar files will use META-INF.

2. Plenty. Any Java IDE worth its salt should do this - see JBoseIDE, MYEclipse, JBuilder etc.

(look at that - three answers at once)
[ October 04, 2005: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jar & war files