Tomcat's documentation includes a pretty good description of the architecture of a WAR, and WARs are the basis of every
J2EE web application. So it's a good thing to read up on.
Start here:
http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html
The actual WAR layout information is here:
http://tomcat.apache.org/tomcat-6.0-doc/appdev/deployment.html
There's also a section provided on how to organize project source for building with the
ANT tool. Because of the multitude of different tasks it takes to build a WAR, I recommend you use a command-line build tool like Ant or Maven. Back before they were invented I used scripts and it wasn't much fun.
I make it a firm policy that ALL my projects can be built from the command without an
IDE. While an IDE is a helpful thing to have, you shouldn't have to depend on it to make critical production builds. I learned this the hard way from IDEs that had become incompatible and from projects that people sent me that could only build if I had the exact same brand and version IDE as they did and had configured a lot of desktop-level items the exact same way they had. On top of that, one place I worked did production builds on a non-GUI machine. Where an IDE wouldn't work at all!