Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 2750 invoked from network); 4 May 2003 01:18:40 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 4 May 2003 01:18:40 -0000 Received: (qmail 21371 invoked by uid 97); 4 May 2003 01:20:49 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 21364 invoked from network); 4 May 2003 01:20:48 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 4 May 2003 01:20:48 -0000 Received: (qmail 1904 invoked by uid 500); 4 May 2003 01:18:32 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 1893 invoked from network); 4 May 2003 01:18:31 -0000 Received: from main.gmane.org (80.91.224.249) by daedalus.apache.org with SMTP; 4 May 2003 01:18:31 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19C880-00063g-00 for ; Sun, 04 May 2003 03:17:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: tomcat-dev@jakarta.apache.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19C880-00063X-00 for ; Sun, 04 May 2003 03:17:20 +0200 From: Costin Manolache Subject: Re: setWrapper and getWrapper in ContainerServlet Date: Sat, 03 May 2003 18:18:55 -0700 Lines: 87 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@main.gmane.org User-Agent: KNode/0.7.2 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I think I see the problem - the test in ServetWrapper.isContainerProvidedServlet() will try to load the servlet class using the container loader.. You need to place the servlet in server/lib or name it o.a.catalina.... I can see no other way. All our trusted servlets start with o.a.catalina, that's why they work. BTW, why do you need the wrapper ? In tomcat5 you can also access the internals by using JMX - I think few methods have a "managedObject" attribute. You can use non-priv webapp, but if sandbox is enabled you need to add permissions for jmx access. ( make sure jmxri.jar or mx4j-jmx.jar are in common/lib, not in server/lib ) Costin Rajiv Mordani wrote: > I have setWrapper implemented as > > public void setWrapper(Wrapper wrapper) { > > System.out.println("setting wrapper"); > this.wrapper = wrapper; > context = (Context) wrapper.getParent(); > host = (Host) context.getParent(); > > } > > Nothing is printed on the console when I access the servlet. > > - Rajiv > -- > :wq > > On Sat, 3 May 2003, Rajiv Mordani wrote: > >> Yep I have set privileged=true. Yes I am aware of the side effect. When >> the servlet is init'd wrapper is null and setWrapper isn't getting >> invoked. Also this is with tomcat 5. >> >> - Rajiv >> -- >> :wq >> >> On Sat, 3 May 2003, Craig R. McClanahan wrote: >> >> > >> > >> > On Sat, 3 May 2003, Rajiv Mordani wrote: >> > >> > > Date: Sat, 3 May 2003 14:28:27 -0700 (PDT) >> > > From: Rajiv Mordani >> > > Reply-To: Tomcat Developers List >> > > To: tomcat-dev@jakarta.apache.org >> > > Subject: setWrapper and getWrapper in ContainerServlet >> > > >> > > Do I have to do anything special to have the container invoke the >> > > setWrapper in a ContainerServlet? I have implemented a >> > > ContainerServlet and the set / getWrapper method but it doesn't seem >> > > to be getting invoked. >> > > >> > >> > The webapp also has to have privileged="true" in its entry -- >> > see how the manager and admin webapps are configured for an example. >> > As a side effect, the parent class loader becomes the server class >> > loader as well. >> > >> > > - Rajiv >> > > -- >> > > :wq >> > > >> > >> > Craig >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org >> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org >> > >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org >> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org >> --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org