When you create a new Web Application Project using the Google-Eclipse plugin, it creates an entire project directory structure for you, including:
src/
META-INF/
jdoconfig.xml
persistence.xml
war/
WEB-INF/
lib/
web.xml
...etc.
First off, my understanding was that META-INF/
was only for utility JARs, not for web apps (WARs). So to see src/META-INF/*
in the project caught me by surprise. But then I've seen examples of GAE web apps that package like so:
TheWebApp.war/
WEB-INF/
lib/
classes/
META-INF/
web.xml
...
blah.jsp
...etc/
With WEB-INF/classes/META-INF/
! On top of this, I don't see any mention of GAE projects and a MANIFEST.MF
directory, which I always see used packaged under META-INF
. Now I'm really confused.
So I think I first need confirmation/clarification on what the role of META-INF
and WEB-INF
are in general, then understand how they can be used together inside the WAR of any web application, and then understand any idiosyncrasies (if they exist) that GAE places on its WAR structures.
Note: I'm not using Maven and don't intend to for at least the next 6 - 12 months (I just don't have time to learn it right now). So if any of the answers to these questions depend on whether you're using a Maven-based buld or not, I'd prefer the non-Maven answers as I'm using Ant/Ivy.
So I ask:
- What are the normal contents of a
META-INF
directory, for utility (library) JARs, executable JARs and WARs? Is aMANIFEST.MF
necessary for WARs (GAE- and non-GAE alike), why or why not? - Where am I supposed to put non-web resources so that their available to the runtime classpath? For instance, say I have
environment.properties
ormyapp-custom-resource-config.xml
...where do I put these? InWEB-INF/
,WEB-INF/classes
,WEB-INF/classes/META-INF
? Somewhere else? - What are the proper contents of a GAE project's
WEB-INF
andMETA-INF
directories, and what's the correct way of packaging them?
Thanks in advance.