I made some comments on the tomcat-user list a few days ago about my attempt
to use EmbededTomcat in 3.2. I've hacked together something that works for
me. When I get it cleaned up I'll post the code.
Bascially I had the following problems
1) Using EmbededTomcat seems to require using a security manager. I
haven't tracked down why, yet, I just added a security policy that opens
everything up.
2) The contexts' context manager wasn't being set. I had to change the
order in which things got created and add a call to
context.setContextManager() in addContext().
3) There was no way to mark contexts as not reloadable.
Again, I was able to embed Tomcat inside my app and it is working. The
EmbededTomcat class is a good starting point for this but you will need to
do some work.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 4:32 PM
To: [EMAIL PROTECTED]
Subject: Re: Use Tomcat As embedded server
> For another approach at embedding Tomcat in an Enterprise server
> check out Enhydra, which is Open Source, at http://www.enhydra.org/
> particularly look at
>
modules/ServletContainer/src/org/enhydra/servlet/servletManager/ServletManag
er.java
>
> which takes on many of the same roles as the EmbededTomcat class included
with
> Tomcat.
> Shawn
As a note - EmbededTomcat is intended as an example of how to embed
tomcat. It is simple enough ( I hope ), and you can use it as is, extend
it or create a new one. In 3.3 everything will be much simpler, with some
clear rules about how to start/stop/configure tomcat.
Costin