tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clay McCoy <>
Subject Re: Embedded tomcat example
Date Fri, 29 Jan 2010 22:46:39 GMT
Thanks everyone for the help.  I ended up making my original thread sleep indefinitely.  I'm
not happy about that, but it works.

There were a lot of replies asking "why".  Again, this is an example project.  Everything
company specific and irrelevant to the example has been removed. It has no purpose other than
to document for others.  I'm attempting to demonstrate the following.
* How to start your web app with embedded Tomcat from a Groovy script.  This is useful in
an IDE with while developing.
* How to make an executable war with Maven that kicks off the above mentioned script.  You
can execute it directly "java -jar HelloWar.war".  All you need is a machine with Java 6.

Having these capabilities in our actual project has given us a much more pleasant developer
experience, and trivialized deployments for testing.  There was very little current documentation
on any of this.  I'll use this example project for a blog post and inter-company documentation
so that others can learn from what I have done.

Also, improvements are very welcome.  Again, the code is here:


On 1/29/10 3:41 PM, "Caldarale, Charles R" <> wrote:

> From: Christopher Schultz []
> Subject: Re: Embedded tomcat example
> That's how Tomcat typically "waits forever" before stopping,
> rather than stopping immediately after initialization.
> You could do something like that.
> Or, you could just do Thread.sleep forever.

But the point Hassan raised still remains: if you don't have anything else to do, why run
Tomcat embedded rather than normally?

(I suppose we could start the hammer vs nail discussion again...)

 - Chuck

for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message