Michael Heuer wrote: > Gary Gregory wrote: > > > - (for me ;-) Provide an Interpolation feature that allows a simple way > > to use System properties to replace variables in a String. For me, this > > could be as simple as: > > > > String s = XXX.resolveAll(source, "$", "{", "}", > > System.getProperties()); > > Maybe it is a bit of overkill, but you could use Velocity for this: > > Velocity.init(); > VelocityContext ctx = new VelocityContext(System.getProperties()); > Template t = new Template(...); // make a template from source > StringWriter sw = new StringWriter(); > t.merge(ctx, sw); > String s = sw.toString();
Sorry, even easier: StringWriter sw = new StringWriter(); VelocityContext ctx = new VelocityContext(System.getProperties()); VelocityEngine.evaluate(ctx, sw, source); michael --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]