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:36:14 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 sriramnrn@gmail.com  2006-01-12 19:36 -------
(In reply to comment #2)
> Created an attachment (id=17402)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17402&action=view) [edit]
> 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, 

This is indeed too much a feature for production use. I added the properties
file support because you'd mentioned in your email that you've a large numebr of
paths to add to the CLASSPATH. You'd mentioned fifteen lines, and fifteen lines
worth of CLASSPATH entries are better added individually and separately, than
clubbed together in one large string.

> 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.
> 

The attachment contains a zip file which contains the Eclipse project (complete
with .project and .classpath files). I just checked the attachment and I see
that it contains this particular zip file as well.

So, you have everything in my attachment to see if how I've addressed the
problem. See what you think of the source.

> 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