P. 1


|Views: 5,639|Likes:
Published by beatrix_boda_1

More info:

Published by: beatrix_boda_1 on Jul 27, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as ODT, PDF, TXT or read online from Scribd
See more
See less





Deploying a GWT application to a web server is straightforward. All you need to do is copy the generated
GWT application files after compilation and host them on your web server. You will also need to setup your
server-side code, of course, and this setup can take on a number of different forms: communicating
through JSONP and working with JSON data, server-side scripts that receive and parse HTTP requests sent
through the GWT RequestBuilder, or GWT RPC (see "Deploying on a servlet container using RPC" section
For an example of deploying GWT application files to a web server, suppose you want to deploy the
DynaTable application on a web server, serving files from /web/apps/dynatable_app/. Once you've run
the GWT compiler and generated the output in the war/dynatable directory, all you need to do is copy
the host HTML page and stylesheet over to web/apps/dynatable_app/ and copy the contents of the
war/dynatable subdirectory to /web/apps/dynatable_app/dynatable/. At this point, the application is
deployed. However, there are a few important points to keep in mind to make sure your application is
properly deployed:

•The host HTML page can actually reside anywhere on your web server.
•The bootstrap script can also reside anywhere on your web server.
•The GWT application files must reside in the same directory as the bootstrap script, since the
script looks for the application files relative to its own location.
•The host HTML page must reference the bootstrap script in its appropriate location on the web


•Any public resources can also be placed anywhere on the web server, but these should ideally
mirror the resources' path relative to the war folder during development. Otherwise, references to
these resources might not hold when deployed (e,g, an Image widget referencing some .png file).

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->