The code in Listing 4 shows access to a single service,
but it would be easy to connect to several sources at once
and produce a mashup of news.

Figure 3. The Application, Running in Hosted Mode

After testing the application, it's time to distribute it. Go to
the directory where you created the project, run the compile
script (in this case, example_script.sh), and
copy the resulting files to your server's Web pages directory.
In my case, with OpenSUSE, it's /srv/www/htdocs, but with
other distributions, it could be /var/www/html (Listing
5). Users could use your application by navigating to
http://127.0.0.1/com.kereki.example/example.html, but of course, you
probably will select another path.

Listing 5. Compiling the Code and Deploying the Files to Your Server

# cd ~/examplefiles/
# sh ./example-compile
Output will be written into ./www/com.kereki.example
Copying all files found on public pathCompilation succeeded
# sudo cp -R ./www/com.kereki.example /srv/www/htdocs/

Conclusion

We have written a Web page without ever writing any HTML or JavaScript
code. Moreover, we did our coding in a high-level language, Java, using
a modern development environment, Eclipse, full of aids and debugging
tools. Finally, our program looks quite different from classic Web pages.
It does no full-screen refreshes, and the user experience will be
more akin to that of a desktop program.

GWT is a very powerful tool, allowing you
to apply current software engineering techniques to an area that is
lacking good, solid development tools.
Being able to apply Java, a high-level modern language, to solve both
client and server problems, and being able to forget
about browser quirks and incompatibilities, should be enough to make
you want to give GWT a spin.

Federico Kereki is a Uruguayan Systems Engineer, with more than 20 years'
experience teaching at universities, doing development and consulting
work, and writing articles and course material. He has been using Linux
for many years now, having installed it at several different companies. He
is particularly interested in the better security and performance of
Linux boxes.