It is important to define the folders structure for a J2EE application.
The J2EE and EJB specifications define a specific folders structure for files, images, deployment descriptors, ..
It is recommended to have a common structure for all J2EE projects.
Here, we present a structure using the Eclipse IDE
(http://eclipse.org/), but you could also use any other IDE.
Eclipse folders structure
build: The Folder where the ANT build files and generated EAR files are placed
ear-module: The EAR module Folder (to generate the ear file) with the META-INF Folder
web-module: The WEB module Folder (to generate the war file) with the WEB-INF Folder
ejb-module: The EJB module Source Folder (to generate the ejb jar file) with the META-INF Folder
client-module: The Client module Source Folder (to generate the client jar file) with the META-INF Folder
gen-src: A Source Folder that contains the XDoclet generated source files (home/remote)
Sample
Folders on the filesystem
_bin: Contains the initial build.xml file to extract the labs and tools
_common: Contains the build.properties file used by all build.xml files
_intalls: Contains all the libs and softwares needed (JDK, Eclipse, jBoss, ANT, ...)