Ich habe ein Problem mit Velocity! Er findet mein properties file nicht. Es liegt unter den package velocity. Wenn ich es mit absoluten Pfaden mach funktioniert es! Aber leider funktioniert es mit relativen dann nicht mehr!
Hier mein Code:
VelocityEngine ve = new VelocityEngine();
ve.init("C:/Dokumente und Einstellungen/manuel/workspace/VelocityDemoServlet/src/velocity/velocity.properties");
/* next, get the Template */
Template t = ve.getTemplate("velocity.vm");
/* create a context and add data */
VelocityContext context = new VelocityContext();
/* now render the template into a StringWriter */
StringWriter writer = new StringWriter();
t.merge( context, writer );
/* show the World */
out.println( writer.toString() );
Hoffentlich kann mir jemand helfen!
LG
Hier mein Code:
VelocityEngine ve = new VelocityEngine();
ve.init("C:/Dokumente und Einstellungen/manuel/workspace/VelocityDemoServlet/src/velocity/velocity.properties");
/* next, get the Template */
Template t = ve.getTemplate("velocity.vm");
/* create a context and add data */
VelocityContext context = new VelocityContext();
/* now render the template into a StringWriter */
StringWriter writer = new StringWriter();
t.merge( context, writer );
/* show the World */
out.println( writer.toString() );
Hoffentlich kann mir jemand helfen!
LG
Zuletzt bearbeitet: