EAR or WAR ?

Hi, I read some pages over the internet but it's still not clear to me : when do I have to use .war and when .ear ? I have the following webapp structure (see below), created a .war out of it, does it follow J2EE standard ?

The webapp is intended to be deployed at one client's, and anyway web.xml comes from Cocoon 2, so it is webapp 2.2-compliant and doesn't need any modification to work with different servlet engines. Thanks for any help,

Babs

/ActiveX/myactivex.cab

/images/jpeg and gif files

/dlls/Win32 dlls

/xml/xml files

/xsl/xsl files

/WEB-INF/web.xml and some other config files

/WEB-INF/lib/all the jars

/javadoc/html pages

[706 byte] By [postb99] at [2007-9-27 22:47:57]
# 1

Java ARchive (JAR) files contain Java classes and Enterprise JavaBeans.

Web Application Archive (WAR) files contain servlet Java code, libraries used by the servlets and possibly static content such as HTML files and JPEGs.

Enterprise Application Archive (EAR) files contain JAR files (EJBs) and WAR files (Servlets).

I hope that answers your question. :)

For more detailed information have a look at the Enterprise JavaBeans Specification and the Servlet Specification:

http://java.sun.com/products/ejb/docs.html

http://java.sun.com/products/servlet/2.2/

Zetor at 2007-7-7 13:51:43 > top of Java-index,Other Topics,Patterns & OO Design...
# 2
BTW, how is this a J2EE Pattern -related question?
Zetor at 2007-7-7 13:51:43 > top of Java-index,Other Topics,Patterns & OO Design...