2010/2/1 Henning Blohm <henning.bl...@gmail.com>:
> Hi,
>
>  this is a question about embedding Tomcat into an application so that
> it can still be configured using server.xml and web applications can be
> added or removed programmatically.
>
>  I am using Tomcat 6.0.24.
>
>  The way I tried to make it work is by instantiating an instance of
> Catalina, feeding in all necessary config and then adding
> StandardContext instances as needed to a named host of a named service
> etc. However there is a bug (I believe) in Catalina that made me
> subclass Catalina and add a getServer() method:
>
> public class MyCatalina extends Catalina {
>        public Server getServer() {
>                return this.server;
>        }
> }
>
>  This is due to Catalina declaring its own protected member variable
> "server" and a corresponding "setServer" method, while Catalina's super
> class Embedded has a private member "server" and a "getServer" method,
> so that Catalina sets its "service" member, but when asking, will return
> super.server which is consistently null.
>

I agree that it is a bug. Please add it to bugzilla.

You can include a link to your message,
http://marc.info/?l=tomcat-user&m=126502245412565&w=2

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to