tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <>
Subject Object accessible to all servlets in the container.
Date Fri, 17 Jan 2003 16:50:23 GMT
Hello all,

I was wondering how\where in Tomcat could I create an Objectthat gets loaded
when the Tomcat Server startsup and is alive and accessible to all Servlets
that are running.

It could contain information about the server that a servlet may be
interested in knowing, or could do things like retrieve a "server" license
for a particular set of functionality for a  servlet.

For example, there would be like this ServerLicenseObject.

if Servlet A runs a component that needs a "per server" license
it contacts the ServerLicenseObject:

ServerLicenseObject.getLicense() - if no license has been retrieved for the
server, it gets it.

Then if Servlet B, want to run the same component which requires the a
server license it calls

ServerLicenseObject.getLicense() - now, in this case, since server A has
already retrieved a "per server" license, this call would just pass back
that license to Servlet B so that it may run the requested component.

Is it possible?
Does anyone know what I would use to get this done (JavaBean, maybe? I'm
Any documentation on doing this type of thing?

Any help is appreciated.
Thanks in advance.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message