You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org> on 2007/03/08 01:10:35 UTC

[jira] Closed: (VELOCITY-112) Exception while running the Velocity code

     [ https://issues.apache.org/jira/browse/VELOCITY-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henning Schmiedehausen closed VELOCITY-112.
-------------------------------------------


> Exception while running the Velocity code
> -----------------------------------------
>
>                 Key: VELOCITY-112
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-112
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.3-rc1
>         Environment: Operating System: All
> Platform: PC
>            Reporter: Sameer Karkhanis
>         Assigned To: Velocity-Dev List
>            Priority: Blocker
>
> I downloaded the build source for Velocity version 1.3-rc1. Imported and ran 
> the sorce in IBM Visual age for Java 
> Here is the sample code i tried to run............
> try{
> 		VelocityEngine ve = new VelocityEngine();
> 	 	ve.init(); 
> 		/*  next, get the Template  */
> 		Template t = ve.getTemplate("C:\\helloworld.vm");
> 		/*  create a context and add data */
> 		VelocityContext context = new VelocityContext();
> 		context.put("name", "World");
> 		/* now render the template into a StringWriter */
> 		StringWriter writer = new StringWriter();
> 		t.merge( context, writer );
> 		/* show the World */
> 		return ( writer.toString() );
> 	}
> 	catch (Exception e){
> 		System.out.println("Got a error" + e.toString());
> 		return ("the error was found");
> 	}
> It returned a "org.apache.velocity.ResourceNotFoundException". 
> Can u tell me  way to get around the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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