velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Castle <cast...@yahoo.com>
Subject Re: Problem with ClasspathResourceLoader
Date Sun, 20 Mar 2011 03:28:32 GMT
Like an idiot, I had my template misspelled.  Apologies for wasting people's time.

Chris

--- On Sat, 3/19/11, Chris Castle <castlec@yahoo.com> wrote:

> From: Chris Castle <castlec@yahoo.com>
> Subject: Problem with ClasspathResourceLoader
> To: user@velocity.apache.org
> Date: Saturday, March 19, 2011, 11:34 AM
> 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());
>         Velocity.init(vProps);
>         try {
>             Template template
> = Velocity.getTemplate("template.vm");
>         } catch (Exception e) {
>             // TODO
> Auto-generated catch block
>            
> e.printStackTrace();
> }
> 
> 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 ,
> 
> Chris
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
> 
> 


      

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


Mime
View raw message