|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
Can't iterater ArrayList<PoJoObject>?Hi,
I am a newer, please bear my ignorance. I have a PoJo java class, it have more than two propertys, so HashMap is useless. The code is like this: public class Property { public String n; public String k; public String vCH; public String vEN; ///pass over the geter & seter } I put the ArrayList<Property> in the VelocityContext. ArrayList<Property> props = new ArrayList<Property>(); props.add();//add some object of Property VelocityContext.put("prop", props); The Template file is like that: #foreach(${p} in ${prop}) ${p}" key="${p.k}" label="${p.l}" #end The result is display: com.demo.tools.velocity.Property@c21495" key="${p.k}" label="${p.l}" com.demo.tools.velocity.Property@15f5897" key="${p.k}" label="${p.l}" It can get ${p}, but can't get the field of $p. HashMap<String,String> is iterator ok, It's the Velocity can't iterater ArrayList<PoJoObject>? Appreciate with U answer. Mead Lai www.yayisoft.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Can't iterater ArrayList<PoJoObject>?Velocity doesn't provide access to fields (even public ones) by default.
you can't skip having getters and setters here. you need to have public String getN() { return n; } public String getK() { return k; } and so on... in order to do $p.k or $p.n On Wed, Apr 30, 2008 at 11:51 PM, Mead Lai <laiqinyi@...> wrote: > Hi, > I am a newer, please bear my ignorance. > I have a PoJo java class, it have more than two propertys, so HashMap > is useless. The code is like this: > > public class Property { > public String n; > public String k; > public String vCH; > public String vEN; > ///pass over the geter & seter > } > > I put the ArrayList<Property> in the VelocityContext. > > ArrayList<Property> props = new ArrayList<Property>(); > props.add();//add some object of Property > VelocityContext.put("prop", props); > > The Template file is like that: > > #foreach(${p} in ${prop}) > ${p}" > key="${p.k}" > label="${p.l}" > #end > > The result is display: > > com.demo.tools.velocity.Property@c21495" > key="${p.k}" > label="${p.l}" > com.demo.tools.velocity.Property@15f5897" > key="${p.k}" > label="${p.l}" > > It can get ${p}, but can't get the field of $p. > HashMap<String,String> is iterator ok, It's the Velocity can't > iterater ArrayList<PoJoObject>? > Appreciate with U answer. > > Mead Lai > www.yayisoft.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > |
|
|
Re: Can't iterater ArrayList<PoJoObject>?hi,
Thanks for your teaching. The data in the POJO, is a group data, have some mapping. I think need use some HashMap to replace it. BestRegards, Mead On Fri, May 2, 2008 at 12:41 AM, Nathan Bubna <nbubna@...> wrote: > Velocity doesn't provide access to fields (even public ones) by default. > you can't skip having getters and setters here. you need to have > > public String getN() { return n; } > public String getK() { return k; } > and so on... > > in order to do $p.k or $p.n > > > > On Wed, Apr 30, 2008 at 11:51 PM, Mead Lai <laiqinyi@...> wrote: > > > Hi, > > I am a newer, please bear my ignorance. > > I have a PoJo java class, it have more than two propertys, so HashMap > > is useless. The code is like this: > > > > public class Property { > > public String n; > > public String k; > > public String vCH; > > public String vEN; > > ///pass over the geter & seter > > } > > > > I put the ArrayList<Property> in the VelocityContext. > > > > ArrayList<Property> props = new ArrayList<Property>(); > > props.add();//add some object of Property > > VelocityContext.put("prop", props); > > > > The Template file is like that: > > > > #foreach(${p} in ${prop}) > > ${p}" > > key="${p.k}" > > label="${p.l}" > > #end > > > > The result is display: > > > > com.demo.tools.velocity.Property@c21495" > > key="${p.k}" > > label="${p.l}" > > com.demo.tools.velocity.Property@15f5897" > > key="${p.k}" > > label="${p.l}" > > > > It can get ${p}, but can't get the field of $p. > > HashMap<String,String> is iterator ok, It's the Velocity can't > > iterater ArrayList<PoJoObject>? > > Appreciate with U answer. > > > > Mead Lai > > www.yayisoft.com > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@... > > For additional commands, e-mail: user-help@... > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
velocity.propertiesIs there anyway we can set relative paths in this file ? This is the
only configuration file out of dozens that doesn't support this and its making deployment a serious pain. Or can I use environmental variables in this file ? That would work also. If not - how much development would it take to get this to work ? It might be worth it for us to contribute this to Velocity. Thanks, Charlie --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: velocity.propertiesOn Fri, May 2, 2008 at 7:50 AM, csanders <csanders@...> wrote:
> Is there anyway we can set relative paths in this file ? in which file? in velocity.properties? > This is the only configuration file out of dozens that doesn't support this and its making deployment a serious pain. > are you deploying to a servlet container? if so, then the FileResourceLoader is not your friend. you should be using the WebappLoader (aka WebappResourceLoader) that is part of the VelocityTools project. It uses servlet context relative paths. > Or can I use environmental variables in this file ? That would work also. > sounds like a useful thing to me! > If not - how much development would it take to get this to work ? It might be worth it for us to contribute this to Velocity. > i don't think it would be all that hard to add support for including environmental variables in the properties. you would pretty much just watch for properties either coming in or going out of RuntimeInstance for environment variables and do the replacement there. It would probably be easiest to do this in RuntimeInstance#getProperty. > Thanks, > Charlie > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: velocity.properties>are you deploying to a servlet container? if so, then the
>FileResourceLoader is not your friend. you should be using the >WebappLoader (aka WebappResourceLoader) that is part of the >VelocityTools project. It uses servlet context relative paths. Ahh cool, Ill check that out. I know you're the author so its hard for you to present an unbiased view but are there any penalty performances moving to this loader ? >i don't think it would be all that hard to add support for including> >environmental variables in the properties. you would pretty much just >watch for properties either coming in or going out of RuntimeInstance >for environment variables and do the replacement there. It would >probably be easiest to do this in RuntimeInstance#getProperty. Ok thanks. Thanks Nathan, Charlei Nathan Bubna wrote: > On Fri, May 2, 2008 at 7:50 AM, csanders <csanders@...> wrote: > >> Is there anyway we can set relative paths in this file ? >> > > in which file? in velocity.properties? > > >> This is the only configuration file out of dozens that doesn't support this and its making deployment a serious pain. >> >> > > are you deploying to a servlet container? if so, then the > FileResourceLoader is not your friend. you should be using the > WebappLoader (aka WebappResourceLoader) that is part of the > VelocityTools project. It uses servlet context relative paths. > > >> Or can I use environmental variables in this file ? That would work also. >> >> > > sounds like a useful thing to me! > > >> If not - how much development would it take to get this to work ? It might be worth it for us to contribute this to Velocity. >> >> > > i don't think it would be all that hard to add support for including > environmental variables in the properties. you would pretty much just > watch for properties either coming in or going out of RuntimeInstance > for environment variables and do the replacement there. It would > probably be easiest to do this in RuntimeInstance#getProperty. > > > >> Thanks, >> Charlie >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@... >> For additional commands, e-mail: user-help@... >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: velocity.propertiesYou wouldn't happen to have a sample velocity.properties file using
WebappResourceLoader would you ? Thanks, Charlie Nathan Bubna wrote: > On Fri, May 2, 2008 at 7:50 AM, csanders <csanders@...> wrote: > >> Is there anyway we can set relative paths in this file ? >> > > in which file? in velocity.properties? > > >> This is the only configuration file out of dozens that doesn't support this and its making deployment a serious pain. >> >> > > are you deploying to a servlet container? if so, then the > FileResourceLoader is not your friend. you should be using the > WebappLoader (aka WebappResourceLoader) that is part of the > VelocityTools project. It uses servlet context relative paths. > > >> Or can I use environmental variables in this file ? That would work also. >> >> > > sounds like a useful thing to me! > > >> If not - how much development would it take to get this to work ? It might be worth it for us to contribute this to Velocity. >> >> > > i don't think it would be all that hard to add support for including > environmental variables in the properties. you would pretty much just > watch for properties either coming in or going out of RuntimeInstance > for environment variables and do the replacement there. It would > probably be easiest to do this in RuntimeInstance#getProperty. > > > >> Thanks, >> Charlie >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@... >> For additional commands, e-mail: user-help@... >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: velocity.propertiesfor VelocityTools 2 (the WebappResourceLoader), this would look like this:
resource.loader = webapp webapp.resource.loader.class = org.apache.velocity.tools.view.WebappResourceLoader and would look for templates in the webapp's root. if you want to, for instance, hide the templates in ${webappRoot}/WEB-INF/templates, then do this: webapp.resource.loader.path = /WEB-INF/templates/ multiple paths are supported, just like FileResourceLoader. caching and reloading only work in an exploded WAR deployment, of course. i've never compared performance, but it's really outside the concern of the loader. the difference is that you are getting data from ServletContext.getResourceAsStream() instead FileInputStream. so, to compare performance would just be to compare getting resources from your servlet container vs getting them direct from the file system. i can't imagine there is a noteworthy difference. On Fri, May 2, 2008 at 12:06 PM, csanders <csanders@...> wrote: > You wouldn't happen to have a sample velocity.properties file using > WebappResourceLoader would you ? > > Thanks, > Charlie > > > > Nathan Bubna wrote: > > > On Fri, May 2, 2008 at 7:50 AM, csanders <csanders@...> wrote: > > > > > > > Is there anyway we can set relative paths in this file ? > > > > > > > > > > in which file? in velocity.properties? > > > > > > > > > This is the only configuration file out of dozens that doesn't support > this and its making deployment a serious pain. > > > > > > > > > > > > > are you deploying to a servlet container? if so, then the > > FileResourceLoader is not your friend. you should be using the > > WebappLoader (aka WebappResourceLoader) that is part of the > > VelocityTools project. It uses servlet context relative paths. > > > > > > > > > Or can I use environmental variables in this file ? That would work > also. > > > > > > > > > > > > > sounds like a useful thing to me! > > > > > > > > > If not - how much development would it take to get this to work ? It > might be worth it for us to contribute this to Velocity. > > > > > > > > > > > > > i don't think it would be all that hard to add support for including > > environmental variables in the properties. you would pretty much just > > watch for properties either coming in or going out of RuntimeInstance > > for environment variables and do the replacement there. It would > > probably be easiest to do this in RuntimeInstance#getProperty. > > > > > > > > > > > Thanks, > > > Charlie > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: user-unsubscribe@... > > > For additional commands, e-mail: user-help@... > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@... > > For additional commands, e-mail: user-help@... > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: velocity.propertiesOn Fri, May 2, 2008 at 11:55 AM, csanders <csanders@...> wrote:
> > > are you deploying to a servlet container? if so, then the > > FileResourceLoader is not your friend. you should be using the > > WebappLoader (aka WebappResourceLoader) that is part of the > > VelocityTools project. It uses servlet context relative paths. > > > > Ahh cool, Ill check that out. I know you're the author so its hard for you > to present an unbiased view but are there any penalty performances moving > to this loader ? oh, and while Claude and i have done some tweaking on the WebappLoader, Geir was the original creator. :) > > > > > i don't think it would be all that hard to add support for including> > > environmental variables in the properties. you would pretty much just > > watch for properties either coming in or going out of RuntimeInstance > > for environment variables and do the replacement there. It would > > probably be easiest to do this in RuntimeInstance#getProperty. > > > > Ok thanks. > > Thanks Nathan, > Charlei > > > > > > Nathan Bubna wrote: > > > On Fri, May 2, 2008 at 7:50 AM, csanders <csanders@...> wrote: > > > > > > > Is there anyway we can set relative paths in this file ? > > > > > > > > > > in which file? in velocity.properties? > > > > > > > > > This is the only configuration file out of dozens that doesn't support > this and its making deployment a serious pain. > > > > > > > > > > > > > are you deploying to a servlet container? if so, then the > > FileResourceLoader is not your friend. you should be using the > > WebappLoader (aka WebappResourceLoader) that is part of the > > VelocityTools project. It uses servlet context relative paths. > > > > > > > > > Or can I use environmental variables in this file ? That would work > also. > > > > > > > > > > > > > sounds like a useful thing to me! > > > > > > > > > If not - how much development would it take to get this to work ? It > might be worth it for us to contribute this to Velocity. > > > > > > > > > > > > > i don't think it would be all that hard to add support for including > > environmental variables in the properties. you would pretty much just > > watch for properties either coming in or going out of RuntimeInstance > > for environment variables and do the replacement there. It would > > probably be easiest to do this in RuntimeInstance#getProperty. > > > > > > > > > > > Thanks, > > > Charlie > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: user-unsubscribe@... > > > For additional commands, e-mail: user-help@... > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@... > > For additional commands, e-mail: user-help@... > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: velocity.propertiesHey-- would love to see the ability to include system properties in
velocity.properties. I use that feature in log4j.properties all the time. (Incidentally, it's always dangerous to credit individual authorship in an open source project. Jason Van Zyl, Jon Stevens and Daniel Rall were the original creators, with Geir following soon after.) Best, WILL On Fri, May 2, 2008 at 12:23 PM, Nathan Bubna <nbubna@...> wrote: > On Fri, May 2, 2008 at 11:55 AM, csanders <csanders@...> wrote: > > > > > are you deploying to a servlet container? if so, then the > > > FileResourceLoader is not your friend. you should be using the > > > WebappLoader (aka WebappResourceLoader) that is part of the > > > VelocityTools project. It uses servlet context relative paths. > > > > > > > Ahh cool, Ill check that out. I know you're the author so its hard for > you > > to present an unbiased view but are there any penalty performances > moving > > to this loader ? > > oh, and while Claude and i have done some tweaking on the > WebappLoader, Geir was the original creator. :) > > > > > > > > > > i don't think it would be all that hard to add support for including> > > > environmental variables in the properties. you would pretty much just > > > watch for properties either coming in or going out of RuntimeInstance > > > for environment variables and do the replacement there. It would > > > probably be easiest to do this in RuntimeInstance#getProperty. > > > > > > > Ok thanks. > > > > Thanks Nathan, > > Charlei > > > > > > > > > > > > Nathan Bubna wrote: > > > > > On Fri, May 2, 2008 at 7:50 AM, csanders <csanders@...> wrote: > > > > > > > > > > Is there anyway we can set relative paths in this file ? > > > > > > > > > > > > > > in which file? in velocity.properties? > > > > > > > > > > > > > This is the only configuration file out of dozens that doesn't > support > > this and its making deployment a serious pain. > > > > > > > > > > > > > > > > > > are you deploying to a servlet container? if so, then the > > > FileResourceLoader is not your friend. you should be using the > > > WebappLoader (aka WebappResourceLoader) that is part of the > > > VelocityTools project. It uses servlet context relative paths. > > > > > > > > > > > > > Or can I use environmental variables in this file ? That would work > > also. > > > > > > > > > > > > > > > > > > sounds like a useful thing to me! > > > > > > > > > > > > > If not - how much development would it take to get this to work ? > It > > might be worth it for us to contribute this to Velocity. > > > > > > > > > > > > > > > > > > i don't think it would be all that hard to add support for including > > > environmental variables in the properties. you would pretty much just > > > watch for properties either coming in or going out of RuntimeInstance > > > for environment variables and do the replacement there. It would > > > probably be easiest to do this in RuntimeInstance#getProperty. > > > > > > > > > > > > > > > > Thanks, > > > > Charlie > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: user-unsubscribe@... > > > > For additional commands, e-mail: user-help@... > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: user-unsubscribe@... > > > For additional commands, e-mail: user-help@... > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@... > > For additional commands, e-mail: user-help@... > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > -- Forio Business Simulations Will Glass-Husain wglass@... www.forio.com |
|
|
Re: velocity.propertiesOn Fri, May 2, 2008 at 1:42 PM, Will Glass-Husain
<wglasshusain@...> wrote: > Hey-- would love to see the ability to include system properties in > velocity.properties. I use that feature in log4j.properties all the time. > > (Incidentally, it's always dangerous to credit individual authorship in an > open source project. Jason Van Zyl, Jon Stevens and Daniel Rall were the > original creators, with Geir following soon after.) hey, what's life without a little danger? :) > Best, > WILL > > > > On Fri, May 2, 2008 at 12:23 PM, Nathan Bubna <nbubna@...> wrote: > > > On Fri, May 2, 2008 at 11:55 AM, csanders <csanders@...> wrote: > > > > > > > are you deploying to a servlet container? if so, then the > > > > FileResourceLoader is not your friend. you should be using the > > > > WebappLoader (aka WebappResourceLoader) that is part of the > > > > VelocityTools project. It uses servlet context relative paths. > > > > > > > > > > Ahh cool, Ill check that out. I know you're the author so its hard for > > you > > > to present an unbiased view but are there any penalty performances > > moving > > > to this loader ? > > > > oh, and while Claude and i have done some tweaking on the > > WebappLoader, Geir was the original creator. :) > > > > > > > > > > > > > > > i don't think it would be all that hard to add support for including> > > > > environmental variables in the properties. you would pretty much just > > > > watch for properties either coming in or going out of RuntimeInstance > > > > for environment variables and do the replacement there. It would > > > > probably be easiest to do this in RuntimeInstance#getProperty. > > > > > > > > > > Ok thanks. > > > > > > Thanks Nathan, > > > Charlei > > > > > > > > > > > > > > > > > > Nathan Bubna wrote: > > > > > > > On Fri, May 2, 2008 at 7:50 AM, csanders <csanders@...> wrote: > > > > > > > > > > > > > Is there anyway we can set relative paths in this file ? > > > > > > > > > > > > > > > > > > in which file? in velocity.properties? > > > > > > > > > > > > > > > > > This is the only configuration file out of dozens that doesn't > > support > > > this and its making deployment a serious pain. > > > > > > > > > > > > > > > > > > > > > > > are you deploying to a servlet container? if so, then the > > > > FileResourceLoader is not your friend. you should be using the > > > > WebappLoader (aka WebappResourceLoader) that is part of the > > > > VelocityTools project. It uses servlet context relative paths. > > > > > > > > > > > > > > > > > Or can I use environmental variables in this file ? That would work > > > also. > > > > > > > > > > > > > > > > > > > > > > > sounds like a useful thing to me! > > > > > > > > > > > > > > > > > If not - how much development would it take to get this to work ? > > It > > > might be worth it for us to contribute this to Velocity. > > > > > > > > > > > > > > > > > > > > > > > i don't think it would be all that hard to add support for including > > > > environmental variables in the properties. you would pretty much just > > > > watch for properties either coming in or going out of RuntimeInstance > > > > for environment variables and do the replacement there. It would > > > > probably be easiest to do this in RuntimeInstance#getProperty. > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > Charlie > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: user-unsubscribe@... > > > > > For additional commands, e-mail: user-help@... > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: user-unsubscribe@... > > > > For additional commands, e-mail: user-help@... > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: user-unsubscribe@... > > > For additional commands, e-mail: user-help@... > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@... > > For additional commands, e-mail: user-help@... > > > > > > > -- > Forio Business Simulations > > Will Glass-Husain > wglass@... > www.forio.com > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: velocity.propertiesOk, I will try to add this within the next week.
Thanks, Charlie Will Glass-Husain wrote: > Hey-- would love to see the ability to include system properties in > velocity.properties. I use that feature in log4j.properties all the time. > > (Incidentally, it's always dangerous to credit individual authorship in an > open source project. Jason Van Zyl, Jon Stevens and Daniel Rall were the > original creators, with Geir following soon after.) > > Best, > WILL > > On Fri, May 2, 2008 at 12:23 PM, Nathan Bubna <nbubna@...> wrote: > > >> On Fri, May 2, 2008 at 11:55 AM, csanders <csanders@...> wrote: >> >>>> are you deploying to a servlet container? if so, then the >>>> FileResourceLoader is not your friend. you should be using the >>>> WebappLoader (aka WebappResourceLoader) that is part of the >>>> VelocityTools project. It uses servlet context relative paths. >>>> >>>> >>> Ahh cool, Ill check that out. I know you're the author so its hard for >>> >> you >> >>> to present an unbiased view but are there any penalty performances >>> >> moving >> >>> to this loader ? >>> >> oh, and while Claude and i have done some tweaking on the >> WebappLoader, Geir was the original creator. :) >> >> >>> >>> >>>> i don't think it would be all that hard to add support for including> >>>> environmental variables in the properties. you would pretty much just >>>> watch for properties either coming in or going out of RuntimeInstance >>>> for environment variables and do the replacement there. It would >>>> probably be easiest to do this in RuntimeInstance#getProperty. >>>> >>>> >>> Ok thanks. >>> >>> Thanks Nathan, >>> Charlei >>> >>> >>> >>> >>> >>> Nathan Bubna wrote: >>> >>> >>>> On Fri, May 2, 2008 at 7:50 AM, csanders <csanders@...> wrote: >>>> >>>> >>>> >>>>> Is there anyway we can set relative paths in this file ? >>>>> >>>>> >>>>> >>>> in which file? in velocity.properties? >>>> >>>> >>>> >>>> >>>>> This is the only configuration file out of dozens that doesn't >>>>> >> support >> >>> this and its making deployment a serious pain. >>> >>>>> >>>>> >>>> are you deploying to a servlet container? if so, then the >>>> FileResourceLoader is not your friend. you should be using the >>>> WebappLoader (aka WebappResourceLoader) that is part of the >>>> VelocityTools project. It uses servlet context relative paths. >>>> >>>> >>>> >>>> >>>>> Or can I use environmental variables in this file ? That would work >>>>> >>> also. >>> >>>>> >>>>> >>>> sounds like a useful thing to me! >>>> >>>> >>>> >>>> >>>>> If not - how much development would it take to get this to work ? >>>>> >> It >> >>> might be worth it for us to contribute this to Velocity. >>> >>>>> >>>>> >>>> i don't think it would be all that hard to add support for including >>>> environmental variables in the properties. you would pretty much just >>>> watch for properties either coming in or going out of RuntimeInstance >>>> for environment variables and do the replacement there. It would >>>> probably be easiest to do this in RuntimeInstance#getProperty. >>>> >>>> >>>> >>>> >>>> >>>>> Thanks, >>>>> Charlie >>>>> >>>>> >>>>> >> --------------------------------------------------------------------- >> >>>>> To unsubscribe, e-mail: user-unsubscribe@... >>>>> For additional commands, e-mail: user-help@... >>>>> >>>>> >>>>> >>>>> >>>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-unsubscribe@... >>>> For additional commands, e-mail: user-help@... >>>> >>>> >>>> >>>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@... >>> For additional commands, e-mail: user-help@... >>> >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@... >> For additional commands, e-mail: user-help@... >> >> >> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
| Free Forum Powered by Nabble | Forum Help |