velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geercken Uwe" <Uwe.Geerc...@swissport.com>
Subject changes template path after init
Date Mon, 03 Jan 2005 13:38:51 GMT
hello everybody and a happy new year,

my web app based on the VelocityLayoutServlet works fine so far. the
startup/default template path is "., de/template", my layout dir path
is: "de/layout/" and this all comes from the velocity.properties file. 

but now I want to change the template path after the initialisation, to
be able to allow a user of the app to select a different language. my
controller servlet extends VelocityLayoutServlet. in the handleRequest()
method I added following code:

public Template handleRequest(HttpServletRequest
request,HttpServletResponse response,
org.apache.velocity.context.Context context ) throws Exception
{
Vector v = new Vector();
v.add(".");
v.add("eng/template");
ExtendedProperties ep = this.loadConfiguration(this.getServletConfig());
ep.setProperty("webapp.resource.loader.path",v);
ep.setProperty("tools.view.servlet.layout.directory","eng/layout");
this.init();
...
...
return template;
}

but this does not work. it always uses the default settings from the
velocity.properties file. can please somebody give me a hint of what I
am doing wrong?

thanks.

uwe geercken

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


Mime
View raw message