As I've been eluding to in my earlier posts, the primary place where this makes sense 
is in development environments, and that's once place where Tomcat is used 
extensively.  I'm not necessarily advocating modification of the spec, all though I 
can imagine that there are real life scenarios where something like this might be very 
useful.

In our development environment, we have many small "modules" that can be combined into 
a single webapp.  We can pick and choose from various modules at build time to produce 
a distributable webapp.  I think that this is a rather common source configuration in 
large web projects.  It sometimes simply does NOT make sense to organize your code 
within a repository as a monolithic webapp.  When you have structure such as ours, it 
can become very cumbersome to rebuild and deploy the webapp every time that you want 
to see changes in a few jsp/html/css/script files.  Granted, an ant script or batch 
file CAN do this, but it is heavy, and quite frankly, a pain.

Tomcat allows one to replace the classloader used by a container (i.e., a Context), 
and we are doing that with one that points back to the various class repositories for 
our modules.  Now we just need to be able to do the same thing for static resources 
and we will be all set.  I'm going to explore the idea of creating a new DirContext.  
Whether or not this is accepted back into the core is really not a huge issue to me, 
but I'm quite certain that there are others that would find the same thing useful.

Does this make sense to anyone else?

Dave Keyes

-----Original Message-----
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 9:00 AM
To: Tomcat Users List
Subject: RE: Resources for a Context


Howdy,
Can you please illustrate a possible use for this feature before you
start coding it?  A use case which can't be addressed by the servlet
spec, that is.  Right now, I doubt such a contribution would be accepted
into tomcat's core, so you may not want to waste time writing it at all
;)

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: David Keyes [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 22, 2003 5:10 PM
>To: Tomcat Users List
>Subject: RE: Resources for a Context
>
>I would be happy to make any modifications that would be required.
I've
>spent a bit of time looking around at the source already, but I'm not
sure
>what the best approach would be.  It would be nice if it could be done
in a
>"plugin" kind of way, but after looking around a bit, it seems that the
>concept of a single physical directory as a docbase is pretty ingrained
>(comments?).
>
>So far, I've looked at the following:
>
>1. Writing a new catalina Context implementation
>2. Writing a new jndi DirContext implementation, that would be
configurable
>to take multiple directories
>
>Of those two, I think #2 makes the most sense, but I have doubts as to
>whether it would solve the problem.  What I'm afraid of is that the
changes
>required are peppered throughout the Tomcat codebase.  Any pointers
that
>you could give me to get me started in the right direction initially
would
>be hugely appreciated.
>
>The only reason that I'm spending so much energy on this is that for
very
>large web applications that are not structured as a webapp, which I
think
>is rather common, it would be a HUGE aid in debugging to be able to
pull
>something like this off.  The code/compile/debug cycle gets a bit
>cumbersome when one is constantly redeploying large apps.  I think for
>deployment the spec works just fine.
>
>Thanks again for your help, and all of your excellent work.
>
>Dave Keyes
>
>-----Original Message-----
>From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, January 22, 2003 4:24 PM
>To: Tomcat Users List
>Subject: RE: Resources for a Context
>
>
>
>
>On Wed, 22 Jan 2003, David Keyes wrote:
>
>> Date: Wed, 22 Jan 2003 15:53:22 -0500
>> From: David Keyes <[EMAIL PROTECTED]>
>> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
>> To: Tomcat Users List <[EMAIL PROTECTED]>
>> Subject: RE: Resources for a Context
>>
>> So what mechanism would you suggest for making MORE than one
Resources
>> directory available for a Context?
>
>* Modify Tomcat to support multiple resources directories
>  (It's open source :-).  Note that you're violating the letter
>  and spirit of the servlet spec's requirements on webapp
>  organization, so it would be problematic accepting such a
>  change back into Tomcat's core.
>
>* Use symbolic links (which doesn't help Windows users much).
>
>* Build deployment scripts that copy everything you need in the webapp
>  together.
>
>Craig
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to