I use GWT-SDK webAppCreator command (from terminal) and it generates all the files required to run on an external server like Tomcat.
I will provide the steps i followed in order to help others begin with simple GWT-TOMCAT development
TOMCAT
- Download a Tomcat version, i prefer
Tomcat 6
http://apache.tsl.gr/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip
- Follow the instructions for your
specific operation system in order
to install it. I followed this
tutorial (MAC-OS)
http://www.malisphoto.com/tips/tomcatonosx.html
GWT
- Download a GWT-SDK version (i use
2.0.4 which i find more stable and compatible with external sources
like EXT-GWT library and TOMCAT)
http://code.google.com/p/google-web-toolkit/downloads/list
- Open your TERMINAL if you are a UNIX
user then change directory to the
GWT-SDK you just downloaded
- Change permissions to run
webAppCreator script. I usually
modify permissions of all files by
typing - > chmod 750 *
- Create a GWT project by executing in
terminal -> ./webAppCreator -out
MyProject com.myproject
- All files are automatically
generated
- Switch directory to the project you
just created, type in terminal -> cd
MyProject
- Compile your project with the ant
script provided by the GWT-SDK, type
in terminal -> ant build
- Open you project and copy it's
build.xml file, war/ contents to
Tomcat's webapps/ROOT folder
- FINALLY open your browser type
localhost:8080/ to run your project
(It will open your project .html
page by default because it is
defined inside /WEB-INF/web.xml
file)
Congratulations!