GWT project directory creation by hand

五迷三道 提交于 2019-12-04 17:32:48

1 What is the war/webModule directory, and what resources go there?

This directory is the result of the GTW compiler:

  • files *.cache.html are the versions for each locale and/or browser.
  • *.cache.png are the images resources & sprites used by your application.
  • If you use RPC there is also *.gwt.rpc for the (de)serialization mechanism.
  • If you use a GWT theme, ie the clean theme, you have a gwt subdirectory with css & resources for this theme.

2 What is war/webModule/clear.cache.gif?

This is a 1x1 cacheable image used to have a placeholder for the <img> tag. See http://code.google.com/p/google-web-toolkit/wiki/ImageBundleDesign ("Clipping constructor for Image")

3 Is there any way to generate war/webModule/webModule.nocache.js myself? Or do I need to generate that from the command-line with one of the GWT SDK tools? (If so, what/how?)

*.nocache.js is generated by the GWT compiler. It is the application loader, which will choose the right locale/browser version of your application. It can be generated with the command line tool, an ant build file (see http://developers.google.com/web-toolkit/doc/latest/RefCommandLineTools for an example), or with maven.

4 What's the war/deploy directory? If I'm using RequestFactory instead of GWT-RPC do I need it?

This directory is generated with the -extra or -deploy option. It is files which are NOT deployed in production and contaning technical informations, for example:

  • rpcPolicyManifest: contains metadata about RPC types used, and policies relative files path
  • symbolMaps: data table to retrieve class names and stack trace from the obfuscated javascript files.

So I think if you don't use RPC, maybe you even need it to have unobfuscated traces.

5 Any other "essentials" I'm missing here?

You can find more details here: https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging

Hope this help...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!