This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
This is an extremely general question, so I'd recommend you read up on the J2EE spec concerning EARs and WARs, as well as consult IBM literature. You might want to try asking this type of question in the EJB/J2EE forum.