velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Changing default locale for VelocityViewServlet and their tools
Date Tue, 31 Aug 2010 09:25:55 GMT
> Subclass VelocityViewServlet and implement a protected void
> fillContext(Context ctx, HttpServletRequest request) method.   Cast
> the Context to a ToolContext and then use do putToolProperty("locale",
> yourLocale).   Or do something like that.  You just need to get ahold
> of the ToolContext and set the locale tool property before the tool(s)
> in question get initialized and after the request locale has been set
> (so yours doesn't get overridden).


thanks for your input. Your approach does work as expected. However my locale may change within
a request so I have to put my tools into the request scope. Moreover the DisplayTool has a
bug. The configure method does not call super.configure and the request locale does never
get set. I will open a jira ticket for.
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message