Configuration Files Walkthrough

In this walkthrough, you'll look at the configuration files used in the Guestbook project:

  • The pom.xml file fully configures the project with everything needed to build and run.
  • The web.xml is used for the servlet mappings.
  • The appengine-web.xml is used for deployment.
  • The file is used for setting application logging behavior.

For more information, see the Configuration Files Overview reference documentation.

This page is part of a multi-page tutorial. To start from the beginning and see instructions for setting up, go to Creating a Guestbook.

Specifying application and SDK versions in pom.xml

To run the sample, you don't need to change anything in the pom.xml. In your own applications, you need to change several values, such as:

  • <>, which sets the application version.
  • <appengine.sdk.version>, which sets the App Engine SDK version for Java.
  • <objectify>, <guava>, and <maven>, which set the versions of their respective tools.

Specifying deployment project ID in appengine-web.xml

To test the sample locally, you don't need to specify the project ID (also called application ID in App Engine).

However, before you can deploy to production, you must specify which project you are deploying to. You do this by setting the <application> value to the project ID you obtained when you created your project in the console, replacing the value your-app-id with your project ID.

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="">

        <property name="java.util.logging.config.file" value="WEB-INF/"/>

For more information, see appengine-web.xml reference documentation.

Specifying default application log level in

By default, the log level set for your application is Warning, as shown below:

# A default java.util.logging configuration.
# (All App Engine logging is through java.util.logging by default).
# To use this configuration, copy it into your application's WEB-INF
# folder and add the following to your appengine-web.xml:
# <system-properties>
#   <property name="java.util.logging.config.file" value="WEB-INF/"/>
# </system-properties>

# Set the default logging level for all loggers to WARNING
.level = WARNING

This suppresses Info messages from the log output. If you want to change the log level for all classes in your app, change this level. For example you could change .level = Warning to .level = Info.

Specifying servlet mapping in web.xml

You don't need to make any changes in web.xml to run and deploy this sample code. There are a few things you should note about the following web.xml file from the sample:




Notice that the guestbook.jsp page is specified as the main page for the app, and that the servlet serves at the URL /sign.

You will learn more about the Objectify portions of this file in Storing Data with Objectify and Cloud Datastore.

For more information, see web.xml reference documentation.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

App Engine standard environment for Java