Question

I just installed the Google Eclipse plugin and created my first test Web Application Project (using both GWT and GAE SDKs). The plugin autogenerated a project that had a war/ directory in it that had some peculiar subdirectories and files in it. An online search for many of these only returned other similar autogenerations of them but without any real explanation of what they are, or what they do:

  • war/WEB-INF/deploy/<myapp>/rpcPolicyManifest/**
  • war/WEB-INF/deploy/<myapp>/symbolMaps/**
  • war/<myapp>/symbolmanifest.json
  • gwt-unitCache/**

I'm also a litte confused about what the proper structure should be for a GWT WAR that is going to be deployed to GAE. What content should be packaged under war/WEB-INF/? What content should be packaged under the war/ root? Any other special considerations for GWT/GAE WARs? Thanks in advance!

Was it helpful?

Solution

Almost everything in the war/ folder is deployed to GAE. With the exception of temp-files that are used by the plugin, such as war/WEB-INF/appengine-generated/

The war/WEB-INF/ folder contains things needed to set up the GAE. This includes GAE settings for servlets, queues, logging, RPC etc. It also includes libraries that are used server-side and some GWT-mappings.

Note that the GWT libraries only are needed at compile-time and not on the server. You can put all GWT libraries in a lib/ folder outside of war/.


  • war/WEB-INF/deploy/<myapp>/rpcPolicyManifest/**

RPC is used to call server-methods directly from GWT-code. GWT/GAE is designed to allow RPC out-of-the-box. My guess is that the existence of a RPC policy manifest file is enough to configure GAE to allow the GWT code to use RPC, so they just put it there so you don't have to worry about it.


  • war/WEB-INF/deploy/<myapp>/symbolMaps/**

The plugin automatically adds the things needed here, so you don't have touch it. But the symbolMaps appear to be a dictionary used by GWT to supply different version of the app based on browser version. The first few lines in one of my symbolMap files read like this:

# { 1 }
# { 'user.agent' : 'gecko1_8' }
# jsName, jsniIdent, className, memberName, sourceUri, sourceLine
Duration,,com.google.gwt.core.client.Duration,,jar:file:/opt/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201208080121-rel-r42/gwt-2.4.0/gwt-user.jar!/com/google/gwt/core/client/Duration.java,21

Which specifies how the JavaScript symbol 'Duration' should be interpreted, given that the user agent is gecko 1.8. Each browser-compilation (FF, Opera, Safari, IE etc.) has it's own mapping, allowing for browser-specific optimizations by the GWT compiler.


  • war/<myapp>/symbolmanifest.json

I don't have this file in my project, but it's probably related to the GWT symbol maps mentioned above. My guess is that it defines the JavaScript symbols that the GWT app uses. If you post a snippet from it we'll be able to see if this is the case.


  • gwt-unitCache/**

This is a cache-folder that is only used during development. See the release notes for GWT 2.4.0:

Persistent Unit Cache: GWT Compiler and Development mode now cache compilation artifacts between runs. This results in faster startup time for iterative development.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top