On Fri, 11 May 2001, Ted Neward wrote:

> Glenn, just out of curiosity, how could someone create an "administrative"
> web-app for controlling and administering Tomcat? (One of the things I've
> been toying with was the idea of doing just such an "administrative"
> interface--installing new webapps, restarting, viewing statistics,
> monitoring the server's progress, and so on.)

In tomcat3.3 - we have the "trusted" attribute, that allows an web
application to:
- "see" all internal classes
- get a reference to the "real" request/context ( using an attribute to
bypass the facade )

That's how the admin/ app works.

I don't know how this is done in 4.0, I suppose they have a similar
mechanism.

Costin  



> 
> Ted Neward
> {.NET||Java} Instructor, DevelopMentor  (http://www.develop.com)
> http://www.javageeks.com/~tneward/index.html
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Glenn Nielsen
> > Sent: Tuesday, May 08, 2001 5:12 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: problems running a servlet that uses core catalina classes
> >
> >
> > In Tomcat 4 the "core" catalina classes in
> > servlet/lib/catalina.jar are hidden
> > from servlets. A servlet should use the standard Servlet 2.3 classes to
> > access public information for the request.  Your servlet would
> > not be portable
> > across differenct servlet containers if you used internal servlet
> > container classes.
> >
> > In addition, making those interal tomcat classes visible to web
> > applications
> > could allow the security of the servlet container and web
> > applications to be compromised.
> >
> > Regards,
> >
> > Glenn
> >
> > Fabien Le Floc'h wrote:
> > >
> > > Hello,
> > >
> > > I am sorry to bother you. But I am trying to write a servlet
> > that uses some core apache classes and I have problems running it.
> > >
> > > - If I use a war archive, tomcat does not find the tomcat
> > classes/servlet classes when it starts the servlet.
> > (ClassNoDefFound error). If I then add the catalina.jar and
> > servlet.jar to the classpath, I have a conflict between classes
> > loaded dynamically by tomcat and classes in the classpath. (More
> > precisely I have an object whose class is ServletWrapper but is
> > not an instance of ServletWrapper. This is because (I guess) the
> > object is created by the Tomcat classloader and it is compared
> > with an instance of the classpath objects),
> > >
> > > - If I put the jar file in the common/lib directory, it finds
> > the servlet classes but not the tomcat classes.
> > >
> > > - If I put the jar file in server/lib directory, it does not
> > load my servlet.
> > >
> > > The only way I can make it work is to put it in the
> > catalina.jar file. But that is not nice at all.
> > >
> > > Could someone help me with this?
> > >
> > > Thank you.
> > >
> > > Fabien Le Floc'h
> > >
> > > P.S.: I was wondering if it was user or developer oriented...
> > As I want to use core Tomcat classes I thought it was developer
> > but maybe I am wrong. Then I apologize.
> >
> > --
> > ----------------------------------------------------------------------
> > Glenn Nielsen             [EMAIL PROTECTED] | /* Spelin donut madder    |
> > MOREnet System Programming               |  * if iz ina coment.      |
> > Missouri Research and Education Network  |  */                       |
> > ----------------------------------------------------------------------
> 

Reply via email to