Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 81661 invoked from network); 13 Mar 2000 16:50:41 -0000 Received: from adsl-63-198-47-229.dsl.snfc21.pacbell.net (HELO costin.dnt.ro) (63.198.47.229) by locus.apache.org with SMTP; 13 Mar 2000 16:50:41 -0000 Received: from localhost (costin [63.198.47.229]) by costin.dnt.ro (8.9.3+Sun/8.9.1) with ESMTP id IAA00757 for ; Mon, 13 Mar 2000 08:50:31 -0800 (PST) From: costin@eng.sun.com Date: Mon, 13 Mar 2000 08:53:11 -0800 (PST) X-Sender: costin@costin To: "tomcat-dev@jakarta.apache.org" Subject: Re: which classes to use to modify server.xml In-Reply-To: <38CCA087.9D7D0C54@postmark.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > It isn't HttpServer, but AdminImpl.java that i have overridden. I have > added a method getHttpServer() which return me the ref. to the > HttpServer that AdminImpl contains. From the HttpServer reference, i get > the CM and so on. > > I'm doing a look up in the RMI Registry to get a reference to the > > HttpServer(Tomcat "HttpServer" class) running[All my program knows is > > the host/port number of the registry].I have overridden the > > HttpServer.java, added a "getContextManager()" method using which i get > > a ref. to the context Manager. This,i use to get the info all the > > contexts i wish to modify(or delete etc.) You are using an old version of tomcat. Get 3.1beta and take a look at the admin interface. ( it's going to have a user/password and run on a different port ). You just need to write a normal servlet and make a normal http connection to your servlet. Inside the servlet you'll access the real Request object and get the ContextManager. Please note that all this will require special permissions for your servlet, and will be protected by a SecurityManager. Costin