Thank you very much, i edit my velocity.properties but i didnt work *Von:* "Velocity Users List" *Gesendet:* 30.04.06 17:57:52 *An:* "Velocity Users List" *Betreff:* Re: can not find velocity template vm file.resource.loader.path= i believe the above means that you want velocity to look for templates in C:, rather than the webapp root. instead, try telling the file resource loader to look in the webapp root where you actually put the template: file.resource.loader.path=D:My DocumentsEclipseworkspaceIPM read more about configuring the resource loaders here: http://jakarta.apache.org/velocity/docs/developer-guide.html#Configuring%20Resource%20Loaders have you tried any of the example applications that come with the VelocityTools project? They show how you can use the VelocityViewServlet, which uses a webapp resource loader to look in the webapp root by default. you can also use the WebappLoader without using the VelocityViewServlet if you would prefer. On 4/30/06, julia schmitz wrote: > > > > Hello to all Velocity - User, > > Can someone help me: Where is the mistake why i get the this Error: > > Error: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'displaylist.vm' > > I give you some more information about my application. > > I have installed Eclipse 3.1.2, Tomcat 5.0.28 and Sysdeo (Tomcat Plugin) 3.1.0. In the %CATALINA_HOME%confweb.xml File i activated the Invoker Servlet. > > My Classpath is : > > ANT_HOME C:javaant > > CATALINA_HOME C:ProgrammeApache Software FoundationTomcat > > JAVA_HOME C:javaj2sdk > > > > Then i added a new Tomcat Project into > > D:My DocumentsEclipseworkspacePM --> application_root (app_root) > > D:My DocumentsEclipseworkspaceIPMWEB-INFlib: here i put the velocity-dep-1.4.jar file > > In the WEB-INF i created 2 files: web.xml and velocity.properties: > > web.xml: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance [http://www.w3.org/2001/XMLSchema-instance]" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee [http://java.sun.com/xml/ns/j2ee] http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd [http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd]" > version="2.4"> > > Test > Test > > Test > /Test > > properties > >/WEB-INF/velocity.properties > > > Test > /Test > > > > > velocity.properties: > > file.resource.loader.path = / > file.resource.loader.cache = true > file.resource.loader.modificationCheckInterval = 1 > runtime.log.error.stacktrace = true > runtime.log = /WEB-INF/velocity.log > > This is my test Class: > > package test; > > import java.io.PrintWriter; > import java.util.Vector; > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > import org.apache.velocity.*; > import org.apache.velocity.context.Context; > import org.apache.velocity.*; > import org.apache.velocity.app.*; > import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader; > import org.apache.velocity.servlet.*; > import org.apache.velocity.context.*; > import javax.servlet.*; > import javax.servlet.http.*; > import java.util.*; > import java.io.*; > import org.apache.velocity.servlet.VelocityServlet; > import java.io.*; > > public class Test extends VelocityServlet { > > public Template handleRequest(HttpServletRequest request, > HttpServletResponse response, Context context)throws Exception { > > PrintWriter out = response.getWriter(); > Vector v = new Vector(); > v.add("one"); > v.add("two"); > v.add("three"); > context.put("list", v);; > Template template = null; > try { > template = Velocity.getTemplate("displaylist.vm"); > > } catch (Exception e) { > > out.println(""); > out.println(""); > out.println("Error"); > out.println(""); > out.println(""); > out.println("

This is the Error:

"); > out.println("Error: " + e); > out.println(""); > out.println(""); > } > return template; > } > } > > > > I put the displaylist.vm in the app_root. > > I hope you can understand what i did and can you see where is the mistake? > > Thank you very very much because i tried eveything and the template is not found. > > Bye Bye > > Julia > > > > SMS schreiben mit WEB.DE FreeMail - einfach, schnell und > kostenguenstig. Jetzt gleich testen! *http://f.web.de/?mc=021192* [http://f.web.de/?mc=021192] > > --------------------------------------------------------------------- To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: velocity-user-help@jakarta.apache.org SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! *http://f.web.de/?mc=021192* [http://f.web.de/?mc=021192]