tomcat deployment is a nightmare

11 views
Skip to first unread message

amic...@gmail.com

unread,
Dec 27, 2006, 8:55:28 PM12/27/06
to Google Web Toolkit
Hi,

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

MHu

unread,
Dec 28, 2006, 11:21:45 PM12/28/06
to Google Web Toolkit
This is not GWT's problem. Tomcat is very easy to use. I think the
problem is that you are not familiar with the J2EE architecture,
specifically Servlets. Tomcat as a servlet container does everything
according to the standards. So are all other servlet containers.

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.

amic...@gmail.com

unread,
Dec 28, 2006, 11:26:08 PM12/28/06
to Google Web Toolkit
Yes, I am not familiar with the J2EE architecture. But so what? It's
probably still possible to provide a cookbook, wizard, or one-click
deploy for typical configurations.

MHu

unread,
Dec 29, 2006, 12:09:04 AM12/29/06
to Google Web Toolkit
Then you are asking the wrong people to provide such cookbook here.
Apache's website has plenty of info on Tomcat. You can also find many
Tomcat books on Amazon. I have used "Mastering Tomcat Development" in
the past and found it to be a great book.

amic...@gmail.com

unread,
Dec 29, 2006, 12:12:56 AM12/29/06
to Google Web Toolkit
It is in Google's interest to make gwt as easy to use as possible.
Rather than asking people to read entire books on tomcat or look
elsewhere for help, Google could provide a cookbook/wizard to make the
process as easy as possible for simple/typical configurations.

mP

unread,
Dec 29, 2006, 1:48:35 AM12/29/06
to Google Web Toolkit
No one can expect everything to be easy. We all learn thru trial and
error especially when we are using something new. It helps to learn
things properly eg by reading a book rather than guessing. THere are
many well thought out reasons why things are they way they are in j2ee
and many other technologies.

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.

Amir Michail

unread,
Dec 29, 2006, 7:32:20 AM12/29/06
to Google-We...@googlegroups.com

Maybe another example would help. Try comparing the gnu build system
with what eclipse offers. Which would you rather use?

Amir

>
> >
>

charlie...@gmail.com

unread,
Dec 29, 2006, 9:53:18 AM12/29/06
to Google Web Toolkit
If you do not have server side RPC resources then you do not even need
Tomcat - you just have HTML/JavaScript and you can deploy them on any
HTTP server by copying the "www" folder GWT creates over. Done.

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.

Amir Michail

unread,
Dec 29, 2006, 10:17:24 AM12/29/06
to Google-We...@googlegroups.com
On 12/29/06, charlie...@gmail.com <charlie...@gmail.com> wrote:
> ...

>
> 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

Jason Essington

unread,
Dec 29, 2006, 11:12:39 AM12/29/06
to Google-We...@googlegroups.com
Actually, GWT is primarily a client side technology. This means that
a GWT application can be used with just about any server side
technology you choose. With this in mind it is a little much to
expect that Google's GWT team should document the deployment process
for every server/database technology combination that a user might
choose.

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

charlie...@gmail.com

unread,
Dec 30, 2006, 3:51:31 PM12/30/06
to Google Web Toolkit
If those people managed to "choose" GWT then there is certainly no
issue with them choosing a build and deployment process.

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").

Reply all
Reply to author
Forward
0 new messages