-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sergio,

On 9/23/2009 7:41 AM, Sergio Bello wrote:
> I'm trying to get access to services defined inside the server element
> on my server.xml. I'm using a Tomcat 5.0.28.
> My problem is that when I execute the next code:
> 
> Server server = ServerFactory.getServer();
> Service[] services = server.findServices();

Did you copy catalina.jar into your webapp's WEB-INF/lib directory? If
so, then the Server class is not the same as the one loaded by Tomcat to
do it's actual work.

You'd have to put catalina.jar into a shared ClassLoader and remove it
from your webapp in order to get the correct Service class object.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkq6XTUACgkQ9CaO5/Lv0PAYnACgkTPZSN6VxAtNhvQyoM1IDyAu
HicAn392XZq/S5/EgAq8jZtikWaiPjJ0
=on0f
-----END PGP SIGNATURE-----

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

Reply via email to