I finally got my gwt app using derby db deployed via tomcat under
ubuntu edgy.
It was not a pleasant experience to say the least.
Something needs to be done to fix this. I suspect that I'm not the only
one unfamiliar with tomcat who was looking for simple step-by-step
instructions for deployment.
Amir
GWT chose to use servlet as its backend implementation. So you will
have to learn the sevlet part first. Google should have made this
prerequisite clearer so that developers are prepared when they start
coding GWT.
Its not googles fault - you cant skip corners.. you must invest the
time to learn. By reading the available resources you wll not only
answer the questiosn you have you will learn many things you never
thought were an issue.
Maybe another example would help. Try comparing the gnu build system
with what eclipse offers. Which would you rather use?
Amir
>
> >
>
If you do have server side RPC resources then yes, it is a bit more
complicated, but as a few of the other posters here have pointed out it
is fairly standard JEE stuff. You need a servlet container (be it
Tomcat or any other) and you need to define your server side resources
in your deployment descriptor (web.xml) - and then have said resources
on the containers classpath - that is pretty much it.
Granted this is not automatic and probably is confusing if you are not
familiar with JEE, but there are utilities and such that can help with
(and even automate) the process.
Things like Maven, and the gwt-maven plugin make creating a war which
can be dropped into the container a matter of "maven gwt:war".
I made a sample app that demonstrates the maven plugin *AND* also
describes that the plugin is doing so that it might be a helpful
overview to anyone who does not want to use Maven. (And note that I
still use Maven 1.x, so thats what the sample shows, the plugin does
come in versions 1 and 2, but I have not yet worked with the 2
version).
See the following link for GWT Maven info, and the "sample" app:
http://www.screaming-penguin.com/docs/maven-googlewebtoolkit-plugin/index.html
And others have also posted Ant scripts in the forum that package
things into a war as well.
Yes, those are certainly steps in the right direction. The only
problem is that it would be hard for people to choose which one to try
and it's not clear which ones work -- at least in typical
configurations.
If Google officially endorses one of these methods, or develops
something similar, then that would be great.
Amir
There is also the issue of which OS you are installing the server on.
Although most *nix systems are similar, they each have their own
quirks, and the install and configuration tends to be different than
on windows.
GWT does include some server side components (only one servlet and an
object serializer) to simplify the use of GWT-RPC. There is a bit of
documentation available for packaging and deploying based on that
technology. The remaining problem is that integration with your
database is still an unknown. And even the authors of server side
books (servlet, php, whatever) tend to not attempt to describe the
use of every possible database.
So, by the time you combine the possibility of server side
technology, database system, and underlying OS, the possible
combinations to document would easily reach into the thousands.
Expecting Google to attempt that is as unrealistic as expecting them
to document how to program in java so you can use GWT.
GWT is only one possible piece of a larger puzzle that is your web
application, and as such each web developer is given the
responsibility of learning and understanding how each technology fits
together.
Just some of the technologies I have had to learn over the years:
Java
JEE
Apache server
Tomcat
JBoss
PostgreSQL
Linux administration
OS X administration
Assorted other stuff ...
And finally GWT
There really is no shortcut, I have book cases full of reference
books for each technology that we implement, and no one technology
explains fully how it should be implemented in the larger picture,
that is for the developer/architect to figure out.
It is nice to know however, that most of the technologies used for
web development do have very approachable user bases that are willing
to help when you get stumped on a particular problem.
-jason
GWT uses Java, and hence relies on JEE standards (RPC Servlet, servlet
container, etc) for server side resources.
While I would agree it might be helpful for the GWT team to say "here
is one recipe for doing it with this particular platform and server"
(and in that sense Tomcat makes sense to use an example, because it is
part of GWT for Hosted Mode anyway), I also think that things being
based on well defined standards (JEE specifications) should make it
relatively straightforward to get things deployed. After all, in terms
of the server side resources what we are really talking about, again,
is putting servlets in the deployment descriptor and setting up the
classpath - not exactly mind boggling stuff (which is a credit to GWT -
it uses simple standard existing stuff for facilitating RPC).
Now if you have never deployed anything on any Java container before,
then yeah there will be more to grasp, sure, but that is not something
that we should beat the GWT team up over (not something that has to be
"fixed").