org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource

View: New views
1 Messages — Rating Filter:   Alert me  

org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource

by newbie-gero :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greetings,
i'm facing problem with velocity while trying to find the velocity template on my jsp website.

Currently i'm putting the templates in this path /Server1/sop/templates/vmTemplate.vm where Server1 is the root.

I have upload my java file to connect to the velocity template as shown here: vmTemplate.java

The error i'm getting are shown below:

org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/Server1/sop/templates/vmTemplate.vm'
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:452)
        at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:335)
        at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1102)
        at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1077)
        at org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:303)


Please guide me on what should i do to enable the java file to read where the template is. Thanks
LightInTheBox - Buy quality products at wholesale price