tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38223] - ConfigurableClasspathWebappLoader
Date Thu, 12 Jan 2006 18:20:46 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38223>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38223





------- Additional Comments From oded@m-wise.com  2006-01-12 19:20 -------
Created an attachment (id=17402)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17402&action=view)
Configurable webapp loader that can add to the web application classpath

Sriram: Thanks for the pointer.  
 
I didn't much like the implementation though - (a) I don't like the need to 
create a properties file: though it will greatly simplify the setup if you 
have multiple web applications with the same requirements, for me this is 
needed for development work only and I don't want developers to get too 
comfortable with this hack, and (b) I didn't like the fact that the attached 
file doesn't have the source for the class loader, so I couldn't see for myself
how it does this and fix my first problem.

So I created a new class, based on WebappLoader (not WebappClassLoader), which
very simply offers a 'classpath' attribute for the loader, which when filled
with classpath entries (colon separated or whatever your platform likes) it
adds them to the list of repositories in WebappLoader.

So my context looks like this:
<Context path="/my/webapp" docBase="/path/to/my/webapp" debug="0"
privileged="true" reloadable="true">
    <Loader
className="org.apache.catalina.loader.ConfigurableWebappClassLoader"
classpath="/path/to/extra/classes:/path/to/more/classes"/>
</Context>

I've tested it to work nicely with Tomcat 5.0.30

I license this code under triple licenses: GPL, LGPL and Apache. I won't mind
if this be added to the Tomcat distribution, though at this point I don't mind
- I only build development servers once in quite a while and the current one is
all done :-)


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message