Hmmm... Interesting, the reply that i had posted relating to the exception stacktrace seems to have disappeared
I am still not sure what the difference is between jar, war, and ear files.
A jar is a just a collection of resources. Its just a library (might contain class files, metadata files, configuration files etc...).
war is a web archive containing your web application. This will contain a WEB-INF folder which will have a web.xml file. It can contain other resources like jsps, html, servlet class etc... It can also contain the jar files (the libraries) inside it.
ear is an enterprise archive which can contain EJBs and other resources. Along with this, the ear can contain the war files as well as jar files.
This is just a simple explanation about what each archive is meant for. You will certainly find more useful detailed explanations about each of them over the internet. [ February 02, 2007: Message edited by: Jaikiran Pai ]
For understanding what each element in the xml is meant to do, the dtds are the best place. For example, for the ejb-jar.xml, you will find the dtd here. The dtd will explain each element that can be present in the xml.