Sergio Bello wrote: > Hi all, > 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(); > > the services array is 0 length, while I have the default <Service > name="Catalina"> element inside <Server> > If I execute other server object's methods, like getInfo() or getPort(), > it seems to return correct information. > I've read some people on the web saying it's a privileges problem, and > I've tryed including the privileged="true" field inside my application > Context, without success. > What could be going on?
No idea but... 5.0.x is unsupported. The ServerFactory has been removed completely in 7.0.x and has 'issues' when used in an embedded environment. There will probably be a better way to access the Server object, depending on where you are trying to access the Server object from. Is this in your web app? Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org