velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Castle <>
Subject Problem with ClasspathResourceLoader
Date Sat, 19 Mar 2011 15:34:34 GMT
Hi all, I’ve got what I’m sure is a simple problem with the ClasspathResourceLoader.  I
have defined the following properties and put my template in the root of my single jar.  I’m
getting a ResourceNotFoundException from it.

        Properties vProps = new Properties();
        vProps.put(Velocity.RESOURCE_LOADER, "classpath");
        vProps.put("classpath." + Velocity.RESOURCE_LOADER + ".class" , ClasspathResourceLoader.class.getName());
        try {
            Template template = Velocity.getTemplate("template.vm");
        } catch (Exception e) {
            // TODO Auto-generated catch block

On a side note, is there an archive search somewhere that I have missed?  I'm sure this problem
has been answered plenty of times.
Thanks for the help ,



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message