Organizing xml Configuration Files

Note: Services were previously called "modules", and services are still declared in appengine-web.xml files as modules, for example: <module>service_name</module>.

Directory structure

Configuration files in xml format are only used for the Java 8 / Jetty 9.3 runtime that supports the App Engine APIs.

The appengine-web.xml configuration file defines the scaling type and the CPU, disk, and memory resources for a specific version of a service.

An App Engine application is organized as collection of directories, one for each service in the app. These directories are unpacked Java Web Application Archives (WAR). Each directory usually has the same name as the service it defines, but this is not required. If you are using maven, your file hierarchy should look like this:


The file appengine-web.xml defines the configuration of services. Each service has its own file, which defines the scaling type and instance class for a specific service/version. Different scaling parameters are used depending on which type of scaling you specify. If you do not specify scaling, automatic scaling is the default.

Note that while every appengine-web.xml file must contain the <application> tag, the name you supply there is ignored. The name of the application is taken from the <application> tag in the appengine-application.xml file.

The default service

Every application has a single default service. The default service is identified in the appengine-web.xml with the setting <service>default</service>.

Optional configuration files

These configuration files control optional features that apply to all the services in an app:

To deploy and apply these configuration settings to your App Engine environment, use:

gcloud app deploy dispatch.yaml
gcloud app deploy queue.yaml
gcloud app deploy index.yaml
gcloud app deploy cron.yaml

Send feedback about...

App Engine flexible environment for Java docs