velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav Gehlot <ggeh...@siac.com>
Subject Using ClassPathResourceLoader in an app
Date Tue, 07 Dec 2004 16:52:43 GMT
Hi,
      I am trying to use Velocity in an application with ClassPath resource
loader. Is the following usage correct to set this loader programatically,

      Velocity.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM, new
VelocityLogger(LOGGER));
      Velocity.setProperty(Velocity.RESOURCE_LOADER, "classpath");
            Velocity.setProperty("classpath." +
VelocityEngine.RESOURCE_LOADER + ".class",
ClasspathResourceLoader.class.getName());

      Also, is it possible to cache the templates using ClassPathLoader as
can be done with FileResourceLoader using the
Velocity.FILE_RESOURCE_LOADER_CACHE property?
Thanx
gaurav


-----------------------------------------
This message and its attachments may contain  privileged and confidential
information.  If you are not the intended recipient(s), you are prohibited
from printing, forwarding, saving or copying this email.  If you have
received this e-mail in error, please immediately notify the sender and
delete this e-mail and its attachments from your computer.


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message