tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: custom <Resources> class
Date Mon, 01 Apr 2002 17:14:40 GMT

On Sun, 31 Mar 2002, Vladimir Vanyukov wrote:

> Date: Sun, 31 Mar 2002 23:10:49 -0500
> From: Vladimir Vanyukov <>
> Reply-To: Tomcat Users List <>
> To: Tomcat Users List <>
> Subject: custom <Resources> class
> Does anyone know where I can get some decent info on writing my own
> class to use in the <Resources> element in server.xml. What I want to be
> able to do is have tomcat obtain all of its static resources (i.e.
> .class files, JSP pages, HTML, .properties, etc) from a database using

Deep down inside of Tomcat 4, the Resources implementation class is a implementation (from the JNDI API).
You will want to get the JNDI specs ( as
you look into this.

A good starting point would be to look at the following classes in the
org.apache.naming.resources package:
* BaseDirContext - Convenience base class for resources implementations
* FileDirContext - Implementation used when you run a webapp from an
  unpacked directory
* WARDirContext - Implementation used when you run a webapp directly
  from a WAR file

The mechanism by which the right resources implementation is selected is a
little obtuse, and I've never actually tried replacing it via the
<Resources> element, but it should be possible.

> ANY help you be greatly appreciated!
> Vlad


To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message