velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Stevens <>
Subject Re: singleton Velocity engine
Date Wed, 04 Jul 2001 22:43:30 GMT
One solution for this is to load each instance of Velocity in its own
classloader. That way, within the same ServletContext, you will still have a
unique instance of Velocity. The controller servlet that you use can
differentiate between the different applications within the context by
something like the domain name and you can therefore have a mapping of
something like this:


ServletContext => root
    classloader1 =>
    classloader2 =>
    classloader3 =>

URI's would look like this:

All of the domains can be mapped to the same Context.

It should be relatively easy to implement this and would solve the problem
right away.


View raw message