tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cox, Charlie" <c...@cincom.com>
Subject RE: Executing Java classes and Class Loader
Date Tue, 22 Apr 2003 13:56:53 GMT
> -----Original Message-----
> From: Balaji [mailto:balaji@india.adventnet.com]
> Sent: Tuesday, April 22, 2003 8:06 AM
> To: Tomcat Users List
> Subject: Executing Java classes and Class Loader 
> 
> 
> Hi,
> 
> I have two questions.
> 
> 1. Is it possible for me to execute my Java classes at the 
> start up of the 
> Tomcat Server. Basically, these classes will initialize few of my 
> parameters at the startup along with the container.?
> 

put your code in a servlet's init() and make the servlet load on startup in
your web.xml


> 2. Which ClassLoader is used to load the Admin and Manager 
> applications 
> under server/webapps? Can I place my webapp in this directory 
> to access the 
> MBeanServer ?
> 

The server classloader loads those applications. You should be able to use
the MBeanServer by setting priviledged="true" for your <Context>. FYI - by
doing this, you are allowing your webapp to access all the tomcat internal
classes.

Charlie

> Kind Regards
> Bala 
> 

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


Mime
View raw message