tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajiv Mordani <Rajiv.Mord...@Sun.COM>
Subject Re: setWrapper and getWrapper in ContainerServlet
Date Sun, 04 May 2003 07:15:48 GMT
Well using o.a.catalina isn't really an option for most folks outside the
tomcat community / commercial products that build on tomcat.. Can try
putting it in server/lib and see if that works. I do have jmxri in
common/lib. Using the wrapper to see which applications are deployed.
Something similar though not exactly as the manager webapp.

- Rajiv
--
:wq

On Sat, 3 May 2003, Costin Manolache wrote:

> 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 <Rajiv.Mordani@Sun.COM>
> >> > > Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> >> > > 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 <Context> 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
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message